소스 검색

dpkg: When ignoring invalid remove requests consider that progress

Because we've taken out the package from the queue, and acted on it, by
way of ignoring it, we need to consider that progress when processing
the queue, otherwise for huge amount of requests the decreasing queue
length at some point will be shorter than the amount of packages that
have not supposedly progressed.

Closes: #143307
Guillem Jover 13 년 전
부모
커밋
1057ebd7e9
2개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      debian/changelog
  2. 2 0
      src/remove.c

+ 2 - 0
debian/changelog

@@ -31,6 +31,8 @@ dpkg (1.17.2) UNRELEASED; urgency=low
   * Fix field names on error messages in libdpkg, by either capitalizing them
     or by renaming them to match reality.
   * Do not capitalize error and warning messages.
+  * When ignoring invalid remove requests in dpkg consider that progress,
+    reset the loop detector and avoid the assert. Closes: #143307
 
   [ Updated programs translations ]
   * German (Sven Joachim).

+ 2 - 0
src/remove.c

@@ -103,6 +103,7 @@ void deferred_remove(struct pkginfo *pkg) {
   }
 
   if (pkg->status == stat_notinstalled) {
+    sincenothing = 0;
     warning(_("ignoring request to remove %.250s which isn't installed"),
             pkg_name(pkg, pnaw_nonambig));
     pkg->clientdata->istobe= itb_normal;
@@ -110,6 +111,7 @@ void deferred_remove(struct pkginfo *pkg) {
   } else if (!f_pending &&
              pkg->status == stat_configfiles &&
              cipaction->arg_int != act_purge) {
+    sincenothing = 0;
     warning(_("ignoring request to remove %.250s, only the config\n"
               " files of which are on the system; use --purge to remove them too"),
             pkg_name(pkg, pnaw_nonambig));