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

Daniel Burrows dburrows at costa.debian.org
Thu Sep 15 19:23:18 UTC 2005


Author: dburrows
Date: Thu Sep 15 19:23:15 2005
New Revision: 4093

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc
   branches/aptitude-0.3/aptitude/src/ui.cc
   branches/aptitude-0.3/aptitude/src/ui.h
   branches/aptitude-0.3/aptitude/src/view_changelog.cc
Log:
Initialize the continuation to NULL to avoid segfaults.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Thu Sep 15 19:23:15 2005
@@ -1,5 +1,10 @@
 2005-09-15  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/resolver_manager.cc:
+
+	  Initialize the continuation to NULL to prevent nasty nasty
+	  segfaults.
+
 	* src/download_list.cc, src/download_list.h:
 
 	  Add support for a display mode in which no estimated time is

Modified: branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc	Thu Sep 15 19:23:15 2005
@@ -41,7 +41,7 @@
 resolver_manager::resolver_manager(aptitudeDepCache *_cache)
   :cache(_cache), resolver(0), selected_solution(0), out_of_time(false),
    out_of_solutions(false), background_resolver_active(false),
-   resolver_suspend_count(0), resolver_thread(NULL),
+   resolver_suspend_count(0), continuation(NULL), resolver_thread(NULL),
    mutex(threads::mutex::attr(PTHREAD_MUTEX_RECURSIVE_NP))
 {
   cache->pre_package_state_changed.connect(sigc::mem_fun(this, &resolver_manager::discard_resolver));

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	Thu Sep 15 19:23:15 2005
@@ -853,7 +853,7 @@
 
   downloader *abort_state = new downloader;
 
-  download_manager *m = gen_download_progress(false,
+  download_manager *m = gen_download_progress(false, false,
 					      _("Downloading packages"),
 					      _("View the progress of the package download"),
 					      _("Package Download"),
@@ -1219,7 +1219,8 @@
 
   vs_progress_ref p = gen_progress_bar();
 
-  download_manager *m = gen_download_progress(false, _("Updating package lists"),
+  download_manager *m = gen_download_progress(false, true,
+					      _("Updating package lists"),
 					      _("View the progress of the package list update"),
 					      _("List Update"),
 					      NULL);
@@ -2129,6 +2130,7 @@
 }
 
 download_manager *gen_download_progress(bool force_noninvasive,
+					bool list_update,
 					const wstring &title,
 					const wstring &longtitle,
 					const wstring &tablabel,
@@ -2140,14 +2142,14 @@
   if(force_noninvasive ||
      aptcfg->FindB(PACKAGE "::UI::Minibuf-Download-Bar", false))
     {
-      w=download_list::create(abortslot, false);
+      w=download_list::create(abortslot, false, !list_update);
       main_status_multiplex->add_visible_widget(w, true);
       active_status_download=w;
       w->destroyed.connect(sigc::ptr_fun(&reset_status_download));
     }
   else
     {
-      w=download_list::create(abortslot);
+      w=download_list::create(abortslot, true, !list_update);
       add_main_widget(w, title, longtitle, tablabel);
     }
 
@@ -2189,12 +2191,14 @@
 }
 
 download_manager *gen_download_progress(bool force_noninvasive,
+					bool list_update,
 					const string &title,
 					const string &longtitle,
 					const string &tablabel,
 					slot0arg abortslot)
 {
   return gen_download_progress(force_noninvasive,
+			       list_update,
 			       transcode(title),
 			       transcode(longtitle),
 			       transcode(tablabel),

Modified: branches/aptitude-0.3/aptitude/src/ui.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/ui.h	(original)
+++ branches/aptitude-0.3/aptitude/src/ui.h	Thu Sep 15 19:23:15 2005
@@ -171,6 +171,10 @@
  *  \param force_noninvasive if \b true, the generated UI object will
  *            always be "noninvasive" (typically a bar at the bottom of
  *            the screen).
+ *  \param list_update       if \b true, this bar is for a list update
+ *                           (meaning that we have to deal with apt's
+ *                           utterly useless progress indication in this
+ *                           case)
  *  \param title             if a new view is generated, this string is
  *                           used as its title; it will be transcoded.
  *  \param longtitle         if a new view is generated, this string is
@@ -180,6 +184,7 @@
  *  \return the new download manager.
  */
 download_manager *gen_download_progress(bool force_noninvasive,
+					bool list_update,
 					const std::string &title,
 					const std::string &longtitle,
 					const std::string &tablabel,

Modified: branches/aptitude-0.3/aptitude/src/view_changelog.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/view_changelog.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/view_changelog.cc	Thu Sep 15 19:23:15 2005
@@ -99,6 +99,7 @@
     }
 
   download_manager *widget=gen_download_progress(true,
+						 false,
 						 _("Downloading Changelog"),
 						 "",
 						 _("Download Changelog"),



More information about the Aptitude-svn-commit mailing list