[Aptitude-svn-commit] r4297 - in branches/aptitude-0.3/aptitude: . src/generic/apt

Daniel Burrows dburrows at costa.debian.org
Mon Sep 26 21:25:32 UTC 2005


Author: dburrows
Date: Mon Sep 26 21:25:29 2005
New Revision: 4297

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/apt/aptcache.cc
Log:
Fix the code that set packages back to manual mode on a keep or hold.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Mon Sep 26 21:25:29 2005
@@ -1,5 +1,12 @@
 2005-09-26  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/apt/aptcache.cc:
+
+	  Fix the code that sets packages back to manual mode on a keep or
+	  hold: it ran after the package was already kept back, so of
+	  course the test for whether the package was to be deleted was
+	  wrong! (Closes: #278490)
+
 	* src/cmdline/cmdline_action.cc:
 
 	  Only print a message about not being able to forbid an upgrade

Modified: branches/aptitude-0.3/aptitude/src/generic/apt/aptcache.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/apt/aptcache.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/apt/aptcache.cc	Mon Sep 26 21:25:29 2005
@@ -862,17 +862,17 @@
   pre_package_state_changed();
   dirty=true;
 
-  pkgDepCache::MarkKeep(Pkg, Soft);
-  pkgDepCache::SetReInstall(Pkg, false);
-  get_ext_state(Pkg).reinstall=false;
-
   // On an unused package, this has the effect of making it manually
-  // installed.  (check the current version to avoid adjusting purged
-  // packages)
+  // installed.  (check the current version to avoid adjusting
+  // already-removed packages that are being purged)
   if((*this)[Pkg].Delete() && !Pkg.CurrentVer().end() &&
      get_ext_state(Pkg).remove_reason==unused)
     get_ext_state(Pkg).install_reason=manual;
 
+  pkgDepCache::MarkKeep(Pkg, Soft);
+  pkgDepCache::SetReInstall(Pkg, false);
+  get_ext_state(Pkg).reinstall=false;
+
   if(Pkg.CurrentVer().end())
     {
       if((*this)[Pkg].iFlags&Purge)



More information about the Aptitude-svn-commit mailing list