* apt-pkg/depcache.cc:
authorDavid Kalnischkies <kalnischkies@gmail.com>
Fri, 9 Nov 2012 09:43:12 +0000 (10:43 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Fri, 9 Nov 2012 09:43:12 +0000 (10:43 +0100)
  - don't call MarkInstall with the FromUser flag set for packages
    which are dependencies of APT::Never-MarkAuto-Sections matchers

apt-pkg/depcache.cc
debian/changelog

index deb8ec2..6ceb184 100644 (file)
@@ -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;
       }
index 98ae49f..10a3b72 100644 (file)
@@ -10,6 +10,9 @@ apt (0.9.7.7) UNRELEASED; urgency=low
     - do not do lock-step configuration for a M-A:same package if it isn't
       unpacked yet in SmartConfigure and do not unpack a M-A:same package
       again in SmartUnPack if we have already configured it (LP: #1062503)
+  * apt-pkg/depcache.cc:
+    - don't call MarkInstall with the FromUser flag set for packages
+      which are dependencies of APT::Never-MarkAuto-Sections matchers
 
  -- Jordi Mallach <jordi@debian.org>  Thu, 18 Oct 2012 23:30:46 +0200