[maemo-commits] [maemo-commits] r9958 - projects/haf/trunk/apt/apt-pkg/deb

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Feb 16 16:15:37 EET 2007
Author: marivoll
Date: 2007-02-16 16:15:36 +0200 (Fri, 16 Feb 2007)
New Revision: 9958

Modified:
   projects/haf/trunk/apt/apt-pkg/deb/dpkgpm.cc
Log:
  * Applied gcc3-bug.patch which a long time ago did help against a
    segfault that was ultimately blamed on a bug in GCC 3.  It can't hurt,
    so let's have it.


Modified: projects/haf/trunk/apt/apt-pkg/deb/dpkgpm.cc
===================================================================
--- projects/haf/trunk/apt/apt-pkg/deb/dpkgpm.cc	2007-02-16 14:14:51 UTC (rev 9957)
+++ projects/haf/trunk/apt/apt-pkg/deb/dpkgpm.cc	2007-02-16 14:15:36 UTC (rev 9958)
@@ -612,9 +612,6 @@
 	 if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true)
 	    std::clog << "got from dpkg '" << line << "'" << std::endl;
 
-	 // the status we output
-	 ostringstream status;
-
 	 /* dpkg sends strings like this:
 	    'status:   <pkg>:  <pkg  qstate>'
 	    errors look like this:
@@ -643,6 +640,8 @@
 
 	 if(strncmp(action,"error",strlen("error")) == 0)
 	 {
+	    ostringstream status;
+
 	    status << "pmerror:" << list[1]
 		   << ":"  << (Done/float(Total)*100.0) 
 		   << ":" << list[3]
@@ -656,6 +655,8 @@
 	 }
 	 if(strncmp(action,"conffile",strlen("conffile")) == 0)
 	 {
+	    ostringstream status;
+
 	    status << "pmconffile:" << list[1]
 		   << ":"  << (Done/float(Total)*100.0) 
 		   << ":" << list[3]
@@ -675,6 +676,8 @@
 	 // check if the package moved to the next dpkg state
 	 if(next_action && (strcmp(action, next_action) == 0)) 
 	 {
+	    ostringstream status;
+
 	    // only read the translation if there is actually a next
 	    // action
 	    const char *translation = _(states[PackageOpsDone[pkg]].str);


More information about the maemo-commits mailing list