Przeglądaj źródła

* apt-pkg/depcache.cc:
- don't call MarkInstall with the FromUser flag set for packages
which are dependencies of APT::Never-MarkAuto-Sections matchers

David Kalnischkies 13 lat temu
rodzic
commit
c1e0a100d1
2 zmienionych plików z 9 dodań i 13 usunięć
  1. 6 13
      apt-pkg/depcache.cc
  2. 3 0
      debian/changelog

+ 6 - 13
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;
       }

+ 3 - 0
debian/changelog

@@ -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