Przeglądaj źródła

* apt-pkg/algorithms.cc:
- merged from apt--auto-mark (preserve auto-install information in InstallProtect
* cmdline/apt-get.cc:
- fix typo
* cmdline/makefile:
- install apt-mark as well

Michael Vogt 20 lat temu
rodzic
commit
de86a3614a
4 zmienionych plików z 24 dodań i 3 usunięć
  1. 7 2
      apt-pkg/algorithms.cc
  2. 1 1
      cmdline/apt-get.cc
  3. 6 0
      cmdline/makefile
  4. 10 0
      debian/changelog

+ 7 - 2
apt-pkg/algorithms.cc

@@ -1250,8 +1250,13 @@ void pkgProblemResolver::InstallProtect()
       {
 	 if ((Flags[I->ID] & ToRemove) == ToRemove)
 	    Cache.MarkDelete(I);
-	 else
-	    Cache.MarkInstall(I, false, 0, false);
+	 else 
+	 {
+	    // preserver the information if the package was auto
+	    // or manual installed
+	    bool autoInst = (Cache[I].Flags & pkgCache::Flag::Auto);
+	    Cache.MarkInstall(I, false, 0, !autoInst);
+	 }
       }
    }   
 }

+ 1 - 1
cmdline/apt-get.cc

@@ -1451,7 +1451,7 @@ bool DoAutomaticRemove(CacheFile &Cache)
 	 }
       }
    }
-   ShowList(c1out, _("The following packages where automatically installed and are no longer required:"), autoremovelist, autoremoveversions);
+   ShowList(c1out, _("The following packages were automatically installed and are no longer required:"), autoremovelist, autoremoveversions);
    if (!_config->FindB("APT::Get::AutomaticRemove") && 
        autoremovelist.size() > 0)
       c1out << _("Use 'apt-get autoremove' to remove them.") << std::endl;

+ 6 - 0
cmdline/makefile

@@ -52,3 +52,9 @@ SOURCE=apt-key
 TO=$(BIN)
 TARGET=program
 include $(COPY_H)
+
+# The apt-mark program
+SOURCE=apt-mark
+TO=$(BIN)
+TARGET=program
+include $(COPY_H)

+ 10 - 0
debian/changelog

@@ -1,3 +1,13 @@
+apt (0.6.45ubuntu8) edgy; urgency=low
+
+  * apt-pkg/algorithm.cc:
+    - fix pkgProblemResolver.InstallProtect() to preserve the auto-install
+      information (lp: #59457)
+  * cmdline/apt-get.cc:
+    - fix typo in autoremove information (lp: #59420)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Fri,  8 Sep 2006 20:07:22 +0200
+
 apt (0.6.45ubuntu7) edgy; urgency=low
 
   * apt-pkg/depcache.cc: