From: Michael Vogt Date: Thu, 21 Sep 2006 08:56:57 +0000 (+0200) Subject: * merged from the apt--install-recommends branch X-Git-Tag: 0.7.21~284^2~20 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/92bd79d048609dc81e633b3aed95029657ef4e3e?hp=4b6a0fe24b23f37c54dc453ae483c441cf5aaa8b * merged from the apt--install-recommends branch --- diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 5052c62a4..446bbe402 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -864,6 +864,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, bool found=false; VerIterator instVer = Pkg.CurrentVer(); if(!instVer.end()) + { for (DepIterator D = instVer.DependsList(); D.end() != true; D++) { //FIXME: deal better with or-groups(?) @@ -872,9 +873,10 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, 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; + // this is a new dep if it was not found to be already + // a important dep of the installed pacakge + isNewImportantDep = !found; + } } if(isNewImportantDep) if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true) @@ -1099,8 +1101,22 @@ bool pkgDepCache::Policy::IsImportantDep(DepIterator Dep) { 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::Recommends) + { + if ( _config->FindB("APT::Install-Recommends", false)) + return true; + // we suport a special mode to only install-recommends for certain + // sections + // FIXME: this is a meant as a temporarly solution until the + // recommends are cleaned up + string s = _config->Find("APT::Install-Recommends-Section",""); + if(s.size() > 0) + { + const char *sec = Dep.TargetPkg().Section(); + if (sec && strcmp(sec, s.c_str()) == 0) + return true; + } + } else if(Dep->Type == pkgCache::Dep::Suggests) return _config->FindB("APT::Install-Suggests", false); diff --git a/share/debian-archive.gpg.moved.moved b/share/debian-archive.gpg.moved.moved deleted file mode 100644 index bb5ed5033..000000000 Binary files a/share/debian-archive.gpg.moved.moved and /dev/null differ