diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-08-11 17:27:13 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-08-11 17:27:13 +0200 |
commit | 6ea086805714e0dbeecfb5e3e26d3489a624bcd4 (patch) | |
tree | 09f18d12bf7e51029febd636ef0eb23487048777 /apt-pkg | |
parent | 4ef9a929f1cb74f08f764b321cbea62cbfe025a2 (diff) |
* apt-pkg/depcache.cc:
- only work on instVer if we actually have one
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/depcache.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index bfcb8e0eb..b5b96dbcf 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -680,14 +680,15 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, { bool found=false; VerIterator instVer = Pkg.CurrentVer(); - for (DepIterator D = instVer.DependsList(); D.end() != true; D++) - { - //FIXME: deal better with or-groups(?) - DepIterator LocalStart = D; - - if(IsImportantDep(D) && Start.TargetPkg() == D.TargetPkg()) - found=true; - } + if(!instVer.end()) + for (DepIterator D = instVer.DependsList(); D.end() != true; D++) + { + //FIXME: deal better with or-groups(?) + DepIterator LocalStart = D; + + if(IsImportantDep(D) && Start.TargetPkg() == D.TargetPkg()) + found=true; + } // this is a new dep if it was not found to be already // a important dep of the installed pacakge isNewImportantDep = !found; |