From: Michael Vogt Date: Wed, 26 Jul 2006 21:29:20 +0000 (+0200) Subject: * merged with mainline X-Git-Tag: 0.7.24ubuntu1~247^2~5 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/af5a94f4c7b1f2cc797cd1e023e36a1bb359689d?hp=-c * merged with mainline --- af5a94f4c7b1f2cc797cd1e023e36a1bb359689d diff --combined apt-pkg/depcache.cc index 589fc2f7d,58d1d25e5..8560ce4fd --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@@ -17,6 -17,7 +17,6 @@@ #include #include #include - #include /*}}}*/ @@@ -609,8 -610,7 +609,8 @@@ void pkgDepCache::MarkInstall(PkgIterat installed */ StateCache &P = PkgState[Pkg->ID]; P.iFlags &= ~AutoKept; - if (P.InstBroken() == false && (P.Mode == ModeInstall || + if ((P.InstPolicyBroken() == false && P.InstBroken() == false) && + (P.Mode == ModeInstall || P.CandidateVer == (Version *)Pkg.CurrentVer())) { if (P.CandidateVer == (Version *)Pkg.CurrentVer() && P.InstallVer == 0) @@@ -621,9 -621,11 +621,9 @@@ // See if there is even any possible instalation candidate if (P.CandidateVer == 0) return; - // We dont even try to install virtual packages.. if (Pkg->VersionList == 0) return; - /* Target the candidate version and remove the autoflag. We reset the autoflag below if this was called recursively. Otherwise the user should have the ability to de-auto a package by changing its state */ @@@ -711,6 -713,10 +711,10 @@@ if (InstPkg.end() == false) { + if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true) + std::clog << "Installing " << InstPkg.Name() + << " as dep of " << Pkg.Name() + << std::endl; MarkInstall(InstPkg,true,Depth + 1); // Set the autoflag, after MarkInstall because MarkInstall unsets it @@@ -863,13 -869,6 +867,13 @@@ pkgCache::VerIterator pkgDepCache::Poli /* */ bool pkgDepCache::Policy::IsImportantDep(DepIterator Dep) { - return Dep.IsCritical(); + if(Dep.IsCritical()) + return true; + else if(Dep->Type == pkgCache::Dep::Recommends) + return _config->FindB("APT::Install-Recommends", false); + else if(Dep->Type == pkgCache::Dep::Suggests) + return _config->FindB("APT::Install-Suggests", false); + + return false; } /*}}}*/