[Aptitude-svn-commit] r3785 - in branches/aptitude-0.3/aptitude: . src

Daniel Burrows dburrows at costa.debian.org
Tue Aug 9 16:25:33 UTC 2005


Author: dburrows
Date: Tue Aug  9 16:25:30 2005
New Revision: 3785

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/ui.cc
Log:
Don't forget selections when su-to-root fails.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Tue Aug  9 16:25:30 2005
@@ -1,5 +1,11 @@
 2005-08-09  Daniel Burrows  <dburrows at debian.org>
 
+	* src/ui.cc:
+
+	  If su-to-root fails, load selections from the file that we saved
+	  in order to become root (rather than immediately zapping it and
+	  forgetting all stored selections). (Closes: #281232)
+
 	* src/vs_progress.cc:
 
 	  Hide the progress bar in Done *after* triggering a screen

Modified: branches/aptitude-0.3/aptitude/src/ui.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/ui.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/ui.cc	Tue Aug  9 16:25:30 2005
@@ -350,7 +350,6 @@
 	;
 
       unlink(fifoname.c_str());
-      unlink(statusfile.c_str());
 
       if(!WIFEXITED(status) || WEXITSTATUS(status))
 	{
@@ -361,11 +360,17 @@
 	  // We have to clear these out or the cache won't reload properly (?)
 
 	  vs_progress_ref p = gen_progress_bar();
-	  apt_reload_cache(p.unsafe_get_ref(), true);
+	  apt_reload_cache(p.unsafe_get_ref(), true, statusfile.c_str());
 	  p->destroy();
+
+	  unlink(statusfile.c_str());
 	}
       else
-	exit(0);
+	{
+	  unlink(statusfile.c_str());
+
+	  exit(0);
+	}
     }
 }
 



More information about the Aptitude-svn-commit mailing list