This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=3a4e91f3c42850cf5d965c74b1714f78f6b7767c commit 3a4e91f3c42850cf5d965c74b1714f78f6b7767c Author: Guillem Jover <[email protected]> AuthorDate: Wed Aug 15 22:07:53 2018 +0200 libdpkg: Fix pkgbin_name_needs_arch() to ignore empty and missing arches There's no point in arch-qualifying a package name if we got no architecture to qualify it with. --- debian/changelog | 3 +++ lib/dpkg/pkg-show.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index fa9812c87..b877839c1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -169,6 +169,9 @@ dpkg (1.19.1) UNRELEASED; urgency=medium - Do not use stringy eval to define different sub implementations, just assign an anonymous sub to the typeglob. - Use memccpy() instead of strncpy() to quiesce a gcc-8 warning. + - Change pkgbin_name_needs_arch() to never arch-qualify packages that + have an empty or no architecture, which was already handled as part + of varbuf_add_archqual(). * Build system: - Set distribution tarball format to ustar, instead of default v7 format. - Mark PO4A and POD2MAN as precious variables. diff --git a/lib/dpkg/pkg-show.c b/lib/dpkg/pkg-show.c index 479e7090b..6767b5ca4 100644 --- a/lib/dpkg/pkg-show.c +++ b/lib/dpkg/pkg-show.c @@ -34,6 +34,10 @@ static bool pkgbin_name_needs_arch(const struct pkgbin *pkgbin, enum pkg_name_arch_when pnaw) { + if (pkgbin->arch->type == DPKG_ARCH_NONE || + pkgbin->arch->type == DPKG_ARCH_EMPTY) + return false; + switch (pnaw) { case pnaw_never: break; @@ -43,8 +47,7 @@ pkgbin_name_needs_arch(const struct pkgbin *pkgbin, /* Fall through. */ case pnaw_foreign: if (pkgbin->arch->type == DPKG_ARCH_NATIVE || - pkgbin->arch->type == DPKG_ARCH_ALL || - pkgbin->arch->type == DPKG_ARCH_NONE) + pkgbin->arch->type == DPKG_ARCH_ALL) break; /* Fall through. */ case pnaw_always: -- Dpkg.Org's dpkg

