]> git.saurik.com Git - apt.git/commitdiff
* merged from auto-remove
authorMichael Vogt <michael.vogt@ubuntu.com>
Wed, 13 Sep 2006 10:03:37 +0000 (12:03 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Wed, 13 Sep 2006 10:03:37 +0000 (12:03 +0200)
cmdline/apt-get.cc
configure.in
debian/changelog

index 05a256ec4b40c0f3b2f064d82a8ffef070c509f3..089b6470133618d517c1186d29f55077bf57843f 100644 (file)
@@ -1420,14 +1420,20 @@ bool DoUpdate(CommandLine &CmdL)
 bool DoAutomaticRemove(CacheFile &Cache)
 {
    bool Debug = _config->FindI("Debug::pkgAutoRemove",false);
+   bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove");
    pkgDepCache::ActionGroup group(*Cache);
+   
 
    if(Debug)
       std::cout << "DoAutomaticRemove()" << std::endl;
 
-   if (_config->FindB("APT::Get::Remove",true) == false)
-      return _error->Error(_("We are not supposed to delete stuff, can't "
-                            "start AutoRemover"));
+   if (_config->FindB("APT::Get::Remove",true) == false &&
+       doAutoRemove == true)
+   {
+      c1out << _("We are not supposed to delete stuff, can't start "
+                "AutoRemover") << std::endl;
+      doAutoRemove = false;
+   }
 
    string autoremovelist, autoremoveversions;
    // look over the cache to see what can be removed
@@ -1441,7 +1447,7 @@ bool DoAutomaticRemove(CacheFile &Cache)
           
         autoremovelist += string(Pkg.Name()) + " ";
         autoremoveversions += string(Cache[Pkg].CandVersion) + " ";
-        if (_config->FindB("APT::Get::AutomaticRemove")) 
+        if (doAutoRemove)
         {
            if(Pkg.CurrentVer() != 0 && 
               Pkg->CurrentState != pkgCache::State::ConfigFiles)
@@ -1452,8 +1458,7 @@ bool DoAutomaticRemove(CacheFile &Cache)
       }
    }
    ShowList(c1out, _("The following packages were automatically installed and are no longer required:"), autoremovelist, autoremoveversions);
-   if (!_config->FindB("APT::Get::AutomaticRemove") && 
-       autoremovelist.size() > 0)
+   if (!doAutoRemove && autoremovelist.size() > 0)
       c1out << _("Use 'apt-get autoremove' to remove them.") << std::endl;
 
    // Now see if we destroyed anything
index e163a47f1b16c726bf0974410c041d25219e8f32..6ca79fe859cfc06af5ed3309e719918444600780 100644 (file)
@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.45ubuntu8")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.45ubuntu9")
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)
index 036715b8936b82c9596ce3fe0737b0f0c285e49c..5ec586f8588402f6711a78ce5678b29a12d9952a 100644 (file)
@@ -1,3 +1,10 @@
+apt (0.6.45ubuntu9) edgy; urgency=low
+
+  * cmdline/apt-get.cc:
+    - if --no-remove is given, do not run the AutoRemove code 
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Wed, 13 Sep 2006 11:54:20 +0200
+
 apt (0.6.45ubuntu8) edgy; urgency=low
 
   * apt-pkg/algorithm.cc: