Pārlūkot izejas kodu

dpkg: When upgrading, copy over the cached arch-qualified package name

We need to make sure that the cached arch-qualified package name is
updated too, or we might end up with the wrong arch-qualified package
name on cross-upgrades.
Guillem Jover 11 gadi atpakaļ
vecāks
revīzija
6289376d25
2 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 2 0
      debian/changelog
  2. 1 0
      src/unpack.c

+ 2 - 0
debian/changelog

@@ -79,6 +79,8 @@ dpkg (1.18.0) UNRELEASED; urgency=low
     - Reorder directory precedence to:
       «dpkg-shlibdeps -l» > ENV{LD_LIBRARY_PATHS} > cross-multiarch >
       DEFAULT_LIBRARY_PATH > ld.so.conf > DEFAULT_MULTILIB_PATH
+  * When upgrading, copy over the cached arch-qualified package name. This
+    fixes wrong output when cross-grading.
 
   * Perl modules:
     - Rename and deprecate Dpkg::Gettext _g function with new g_.

+ 1 - 0
src/unpack.c

@@ -1239,6 +1239,7 @@ void process_archive(const char *filename) {
   pkg->installed.maintainer= pkg->available.maintainer;
   pkg->installed.source= pkg->available.source;
   pkg->installed.arch = pkg->available.arch;
+  pkg->installed.pkgname_archqual = pkg->available.pkgname_archqual;
   pkg->installed.installedsize= pkg->available.installedsize;
   pkg->installed.version= pkg->available.version;
   pkg->installed.origin = pkg->available.origin;