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

libdpkg: Defer Multi-Arch field reset to pkg_blank()

When removing a package pkgbin_blank() is called and an entry written
to the update log, which might make it unparseable if there's other
Multi-Arch instances present for that package.

Closes: #676496
Guillem Jover лет назад: 14
Родитель
Сommit
5ba5d34199
2 измененных файлов с 4 добавлено и 1 удалено
  1. 2 0
      debian/changelog
  2. 2 1
      lib/dpkg/pkg.c

+ 2 - 0
debian/changelog

@@ -64,6 +64,8 @@ dpkg (1.16.4) UNRELEASED; urgency=low
   * Always activate all path components for file triggers, this fixes file
     trigger handling for conffiles and dpkg-trigger invokations.
     Closes: #675613, #676061, #676062, #676107, #676118, #676122
+  * Do not reset Multi-Arch field in the update log when removing the package.
+    Closes: #676496
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann).

+ 2 - 1
lib/dpkg/pkg.c

@@ -96,7 +96,6 @@ void
 pkgbin_blank(struct pkgbin *pkgbin)
 {
 	pkgbin->essential = false;
-	pkgbin->multiarch = multiarch_no;
 	pkgbin->depends = NULL;
 	pkgbin->pkgname_archqual = NULL;
 	pkgbin->description = NULL;
@@ -133,7 +132,9 @@ pkg_blank(struct pkginfo *pkg)
 	 * because they are part of the package specification, and needed
 	 * for selections. */
 	pkg->installed.arch = dpkg_arch_get(arch_none);
+	pkg->installed.multiarch = multiarch_no;
 	pkg->available.arch = dpkg_arch_get(arch_none);
+	pkg->available.multiarch = multiarch_no;
 }
 
 void