Bläddra i källkod

dpkg-divert: Do not warn on missing db .list file for never installed packages

When the package has never been installed before, and the unpack has not
yet finished, the package will be present on the database but the files
list file will not, which would produce a bogus warning. Check if the
package has ever been configured, before printing the warning.

Closes: #673518
Guillem Jover 14 år sedan
förälder
incheckning
512b27964c
2 ändrade filer med 4 tillägg och 1 borttagningar
  1. 2 0
      debian/changelog
  2. 2 1
      src/filesdb.c

+ 2 - 0
debian/changelog

@@ -56,6 +56,8 @@ dpkg (1.16.4) UNRELEASED; urgency=low
     Closes: #675947
   * Put an & before field_capitalize() calls in Dpkg::Control::Fields to
     fix a usege before declaration warning with perl 5.16. Closes: #676262
+  * Do not warn in dpkg-divert on missing files list file for packages never
+    installed before. Closes: #673518
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann).

+ 2 - 1
src/filesdb.c

@@ -270,7 +270,8 @@ ensure_packagefiles_available(struct pkginfo *pkg)
       ohshite(_("unable to open files list file for package `%.250s'"),
               pkg_name(pkg, pnaw_nonambig));
     onerr_abort--;
-    if (pkg->status != stat_configfiles) {
+    if (pkg->status != stat_configfiles &&
+        dpkg_version_is_informative(&pkg->configversion)) {
       warning(_("files list file for package `%.250s' missing, assuming "
                 "package has no files currently installed."),
               pkg_name(pkg, pnaw_nonambig));