From: Michael Vogt Date: Wed, 2 May 2007 11:58:21 +0000 (+0200) Subject: * updated from http://people.ubuntu.com/~mvo/bzr/apt/auto-mark/ X-Git-Tag: 0.7.21~284^2~1 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/b51ff02a550881118ce4c677a6f2ce1d0aff9cd8 * updated from http://people.ubuntu.com/~mvo/bzr/apt/auto-mark/ --- b51ff02a550881118ce4c677a6f2ce1d0aff9cd8 diff --cc apt-pkg/depcache.cc index 390d93dc8,f5673dd5d..ac667d51d --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@@ -948,11 -907,22 +948,22 @@@ void pkgDepCache::MarkInstall(PkgIterat std::clog << "Installing " << InstPkg.Name() << " as dep of " << Pkg.Name() << std::endl; - MarkInstall(InstPkg,true,Depth + 1, false, ForceImportantDeps); - - // Set the autoflag, after MarkInstall because MarkInstall unsets it - if (P->CurrentVer == 0) - PkgState[InstPkg->ID].Flags |= Flag::Auto; + // now check if we should consider it a automatic dependency or not + string sec = _config->Find("APT::Never-MarkAuto-Section",""); + if(Pkg.Section() && (string(Pkg.Section()) == sec)) + { + if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true) + std::clog << "Setting NOT as auto-installed because its a direct dep of a package in section " << sec << std::endl; + MarkInstall(InstPkg,true,Depth + 1, true); + } + else + { + // mark automatic dependency - MarkInstall(InstPkg,true,Depth + 1, false); ++ MarkInstall(InstPkg,true,Depth + 1, false, ForceImportantDeps); + // Set the autoflag, after MarkInstall because MarkInstall unsets it + if (P->CurrentVer == 0) + PkgState[InstPkg->ID].Flags |= Flag::Auto; + } } continue; } diff --cc doc/examples/configure-index index 56389b749,d3e061f9a..d0aad1e3d --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@@ -94,11 -95,9 +95,14 @@@ AP Cache-Limit "4194304"; Default-Release ""; + // consider Recommends, Suggests as important dependencies that should + // be installed by default + APT::Install-Recommends "false"; + APT::Install-Suggests "false"; + + // consider dependencies of packages in this section manual + Never-MarkAuto-Section "metapackages"; + // Write progress messages on this fd (for stuff like base-config) Status-Fd "-1"; // Keep the list of FDs open (normally apt closes all fds when it diff --cc po/apt-all.pot index 81d742437,0dc932d47..bd066ab06 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@@ -2218,7 -2210,7 +2218,7 @@@ msgstr " msgid "Malformed line %u in source list %s (vendor id)" msgstr "" - #: apt-pkg/packagemanager.cc:402 -#: apt-pkg/packagemanager.cc:403 ++#: apt-pkg/packagemanager.cc:402 apt-pkg/packagemanager.cc:403 #, c-format msgid "" "This installation run will require temporarily removing the essential "