Преглед на файлове

libdpkg: Consider foreign packages ambiguous in need of arch-qualifier

With cross-arch dependencies, foreign arch-qualified dependencies and
foreign packages become really ambiguous in error messages, but also
on the usual progress reporting.

Arch-qualifying foreign packages should be backwards compatible, because
if a user had foreign packages installed on a pre-multiarch dpkg, then
that was already out of spec. And if they do now, it means they have
enabled multiarch. Keeping Multi-Arch:same packages always arch-qualified
still makes sense because those will not appear on a non-Multi-Arch
enabled distribution, and are required to distinguish which instance we
are referring to.
Guillem Jover преди 11 години
родител
ревизия
d658a8ec11
променени са 2 файла, в които са добавени 5 реда и са изтрити 4 реда
  1. 1 0
      debian/changelog
  2. 4 4
      lib/dpkg/pkg-show.c

+ 1 - 0
debian/changelog

@@ -81,6 +81,7 @@ dpkg (1.18.0) UNRELEASED; urgency=low
       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.
+  * Consider foreign packages ambiguous in need of an arch-qualifier.
 
   * Perl modules:
     - Rename and deprecate Dpkg::Gettext _g function with new g_.

+ 4 - 4
lib/dpkg/pkg-show.c

@@ -36,15 +36,15 @@ pkgbin_name_needs_arch(const struct pkgbin *pkgbin,
 	switch (pnaw) {
 	case pnaw_never:
 		break;
+	case pnaw_nonambig:
+		if (pkgbin->multiarch == PKG_MULTIARCH_SAME)
+			return true;
+	/* Fall through. */
 	case pnaw_foreign:
 		if (pkgbin->arch->type == DPKG_ARCH_NATIVE ||
 		    pkgbin->arch->type == DPKG_ARCH_ALL ||
 		    pkgbin->arch->type == DPKG_ARCH_NONE)
 			break;
-		return true;
-	case pnaw_nonambig:
-		if (pkgbin->multiarch != PKG_MULTIARCH_SAME)
-			break;
 	/* Fall through. */
 	case pnaw_always:
 		return true;