diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-04-25 16:52:07 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-04-25 16:52:07 +0200 |
commit | d072e0458951c6166adb334158d0002a4e53a3c5 (patch) | |
tree | 5a7ea6a1fecfad452be9bec1238f058640eacd03 /apt-pkg/depcache.cc | |
parent | 3a341a1deda6123f219765d0cd4a51fd826e213e (diff) | |
parent | 4730bca19d5cb04c3c1af5fcf58f0493e705b228 (diff) |
* Fix syntax/copitalisation in some messages. Thanks to Jens Seidel
for pointing this and providing the patch.
Closes: #466845
* Fix Polish offline translation. Thanks to Robert Luberda for the patch
and apologies for applying it very lately. Closes: #337758
* Fix typo in offline.sgml. Closes: #412900
- German updated. Closes: #466842
- Swedish updated.
- Polish updated. Closes: #469581
- Slovak updated. Closes: #471341
- French updated.
- Bulgarian updated. Closes: #448492
- Galician updated. Closes: #476839
* apt-pkg/depcache.cc:
- Patch MarkInstall to follow currently satisfied Recommends even
if they aren't "new", so that we automatically force upgrades
when the version of a Recommends has been tightened. (Closes: #470115)
* apt-pkg/contrib/configuration.cc
- Lift the 1024-byte limit on lines in configuration files.
(Closes: #473710, #473874)
* apt-pkg/contrib/strutl.cc:
- Lift the 64000-byte limit on individual messages parsed by ReadMessages.
(Closes: #474065)
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r-- | apt-pkg/depcache.cc | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index c21872449..ee9f0da05 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -895,24 +895,41 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, if (IsImportantDep(Start) == false) continue; - /* check if any ImportantDep() (but not Critial) where added - * since we installed the package + /* Check if any ImportantDep() (but not Critical) were added + * since we installed the package. Also check for deps that + * were satisfied in the past: for instance, if a version + * restriction in a Recommends was tightened, upgrading the + * package should follow that Recommends rather than causing the + * dependency to be removed. (bug #470115) */ bool isNewImportantDep = false; + bool isPreviouslySatisfiedImportantDep = false; if(!ForceImportantDeps && !Start.IsCritical()) { bool found=false; VerIterator instVer = Pkg.CurrentVer(); if(!instVer.end()) { - for (DepIterator D = instVer.DependsList(); D.end() != true; D++) - { + 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(!isPreviouslySatisfiedImportantDep) + { + DepIterator D2 = D; + while((D2->CompareOp & Dep::Or) != 0) + ++D2; + + isPreviouslySatisfiedImportantDep = + (((*this)[D2] & DepGNow) != 0); + } + + found=true; + } + } // this is a new dep if it was not found to be already // a important dep of the installed pacakge isNewImportantDep = !found; @@ -922,10 +939,15 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true) std::clog << "new important dependency: " << Start.TargetPkg().Name() << std::endl; + if(isPreviouslySatisfiedImportantDep) + if(_config->FindB("Debug::pkgDepCache::AutoInstall", false) == true) + std::clog << "previously satisfied important dependency on " + << Start.TargetPkg().Name() << std::endl; // skip important deps if the package is already installed if (Pkg->CurrentVer != 0 && Start.IsCritical() == false - && !isNewImportantDep && !ForceImportantDeps) + && !isNewImportantDep && !isPreviouslySatisfiedImportantDep + && !ForceImportantDeps) continue; /* If we are in an or group locate the first or that can |