Просмотр исходного кода

dpkg: Do not assert when configure or remove produced too many errors

Closes: #483655
Ian Jackson лет назад: 18
Родитель
Сommit
5a39b7b59a
3 измененных файлов с 11 добавлено и 1 удалено
  1. 6 0
      ChangeLog
  2. 3 0
      debian/changelog
  3. 2 1
      src/packages.c

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2008-08-15  Ian Jackson  <ian@davenant.greenend.org.uk>
+
+	* src/packages.c (process_queue): When onerr_abort is bigger than 0
+	return instead of breaking out of the loop, to avoid wrongly
+	asserting that !queue.length.
+
 2008-08-15  Guillem Jover  <guillem@debian.org>
 
 	* lib/dbmodify.c (modstatdb_note): Do not call modstatdb_note_core if

+ 3 - 0
debian/changelog

@@ -19,6 +19,9 @@ dpkg (1.14.21) UNRELEASED; urgency=low
     triggers-awaited w/o the corresponding package with pending triggers.
     Closes: #487637, #486843, #489068
   * Fix --no-act in triggers related code. Closes: #495097
+  * Do not assert when dpkg stops processing packages due to too many
+    errors occurred while configuring or removing packages.
+    Thanks to Ian Jackson <ian@davenant.greenend.org.uk>. Closes: #483655
 
   [ Updated scripts translations ]
   * Russian (Yuri Kozlov). Closes: #490076

+ 2 - 1
src/packages.c

@@ -228,7 +228,8 @@ void process_queue(void) {
       /* give up on it from the point of view of other packages, ie reset istobe */
       pkg->clientdata->istobe= itb_normal;
       error_unwind(ehflag_bombout);
-      if (onerr_abort > 0) break;
+      if (onerr_abort > 0)
+        return;
       continue;
     }
     push_error_handler(&ejbuf,print_error_perpackage,pkg->name);