Просмотр исходного кода

- do not show packages already marked for removal as auto-installed

Michael Vogt лет назад: 19
Родитель
Сommit
28e454d68b
2 измененных файлов с 11 добавлено и 5 удалено
  1. 9 4
      cmdline/apt-get.cc
  2. 2 1
      debian/changelog

+ 9 - 4
cmdline/apt-get.cc

@@ -1444,9 +1444,13 @@ bool DoAutomaticRemove(CacheFile &Cache)
 	 if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install())
 	 if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install())
 	    if(Debug)
 	    if(Debug)
 	       std::cout << "We could delete %s" <<  Pkg.Name() << std::endl;
 	       std::cout << "We could delete %s" <<  Pkg.Name() << std::endl;
-	   
-	 autoremovelist += string(Pkg.Name()) + " ";
-	 autoremoveversions += string(Cache[Pkg].CandVersion) + "\n";
+	  
+	 // only show stuff in the list that is not yet marked for removal
+	 if(Cache[Pkg].Delete() == false) 
+	 {
+	    autoremovelist += string(Pkg.Name()) + " ";
+	    autoremoveversions += string(Cache[Pkg].CandVersion) + "\n";
+	 }
 	 if (doAutoRemove)
 	 if (doAutoRemove)
 	 {
 	 {
 	    if(Pkg.CurrentVer() != 0 && 
 	    if(Pkg.CurrentVer() != 0 && 
@@ -1697,7 +1701,8 @@ bool DoInstall(CommandLine &CmdL)
 	    // see if we need to fix the auto-mark flag 
 	    // see if we need to fix the auto-mark flag 
 	    // e.g. apt-get install foo 
 	    // e.g. apt-get install foo 
 	    // where foo is marked automatic
 	    // where foo is marked automatic
-	    if(Cache[Pkg].Install() == false && 
+	    if(!Remove && 
+	       Cache[Pkg].Install() == false && 
 	       (Cache[Pkg].Flags & pkgCache::Flag::Auto))
 	       (Cache[Pkg].Flags & pkgCache::Flag::Auto))
 	    {
 	    {
 	       ioprintf(c1out,_("%s set to manual installed.\n"),
 	       ioprintf(c1out,_("%s set to manual installed.\n"),

+ 2 - 1
debian/changelog

@@ -8,8 +8,9 @@ apt (0.6.46.4ubuntu10) feisty; urgency=low
   * cmdline/apt-get.cc:
   * cmdline/apt-get.cc:
     - "apt-get install foo" on a already installed package foo will
     - "apt-get install foo" on a already installed package foo will
       clean the automatic installed flag
       clean the automatic installed flag
+    - do not show packages already marked for removal as auto-installed
 
 
- -- Michael Vogt <michael.vogt@ubuntu.com>  Wed, 14 Mar 2007 12:34:46 +0100
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Wed, 14 Mar 2007 13:32:32 +0100
 
 
 apt (0.6.46.4ubuntu9) feisty; urgency=low
 apt (0.6.46.4ubuntu9) feisty; urgency=low