Przeglądaj źródła

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 lat temu
rodzic
commit
5ba5d34199
2 zmienionych plików z 4 dodań i 1 usunięć
  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
   * Always activate all path components for file triggers, this fixes file
     trigger handling for conffiles and dpkg-trigger invokations.
     trigger handling for conffiles and dpkg-trigger invokations.
     Closes: #675613, #676061, #676062, #676107, #676118, #676122
     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 ]
   [ Updated man page translations ]
   * German (Helge Kreutzmann).
   * German (Helge Kreutzmann).

+ 2 - 1
lib/dpkg/pkg.c

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