From c1e0a100d11e6e6d529d9f52375f979a9dbd4d04 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 9 Nov 2012 10:43:12 +0100 Subject: * apt-pkg/depcache.cc: - don't call MarkInstall with the FromUser flag set for packages which are dependencies of APT::Never-MarkAuto-Sections matchers --- apt-pkg/depcache.cc | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index deb8ec21f..6ceb18492 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1178,22 +1178,15 @@ bool pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, std::clog << OutputInDepth(Depth) << "Installing " << InstPkg.Name() << " as " << Start.DepType() << " of " << Pkg.Name() << std::endl; - // now check if we should consider it a automatic dependency or not - if(Pkg.Section() && ConfigValueInSubTree("APT::Never-MarkAuto-Sections", Pkg.Section())) - { + MarkInstall(InstPkg, true, Depth + 1, false, ForceImportantDeps); + // now check if we should consider it a automatic dependency or not + if(InstPkg->CurrentVer == 0 && Pkg->Section != 0 && ConfigValueInSubTree("APT::Never-MarkAuto-Sections", Pkg.Section())) + { if(DebugAutoInstall == true) std::clog << OutputInDepth(Depth) << "Setting NOT as auto-installed (direct " << Start.DepType() << " of pkg in APT::Never-MarkAuto-Sections)" << std::endl; - MarkInstall(InstPkg,true,Depth + 1, true); - } - else - { - // mark automatic dependency - MarkInstall(InstPkg,true,Depth + 1, false, ForceImportantDeps); - // Set the autoflag, after MarkInstall because MarkInstall unsets it - if (InstPkg->CurrentVer == 0) - PkgState[InstPkg->ID].Flags |= Flag::Auto; - } + MarkAuto(InstPkg, false); + } } continue; } -- cgit v1.2.3