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

dpkg: Initialize and reset the filesdb in --command-fd

Guillem Jover лет назад: 10
Родитель
Сommit
020460f572
2 измененных файлов с 6 добавлено и 0 удалено
  1. 2 0
      debian/changelog
  2. 4 0
      src/main.c

+ 2 - 0
debian/changelog

@@ -23,6 +23,8 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
     database journal.
   * Do not crash if we pass a NULL cip argument to setaction() in libdpkg.
   * Shutdown the package database journal in dpkg --get-selections.
+  * Fix (deactivated) dpkg --command-fd to initialize and reset the files
+    database on each action.
   * Perl modules:
     - Obsolete Source-Version substvar in Dpkg::Substvars by emitting errors.
     - Rework keyring hooks in Dpkg::Vendor. Deprecate the keyrings hook, and

+ 4 - 0
src/main.c

@@ -868,8 +868,12 @@ commandfd(const char *const *argv)
     dpkg_options_parse((const char *const **)&endargs, cmdinfos, printforhelp);
     if (!cipaction) badusage(_("need an action option"));
 
+    filesdbinit();
+
     ret |= cipaction->action(endargs);
 
+    files_db_reset();
+
     pop_error_context(ehflag_normaltidy);
   }