The following commit has been merged in the master branch: commit 0238c795df88925c6579f740c7681ade22e88625 Author: Guillem Jover <guil...@debian.org> Date: Wed Feb 22 23:45:46 2012 +0100
libdpkg: Use arch_empty type to track missing architectures too The case when the Architecture field is not present is equivalent to the case of a present Architecture with an empty value, except for warning purposes. Track missing architectures on the in-core db w/o overloading arch_none to mean the same, so that we can distinguish truly unused pkginfo slots. diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c index a97cb1e..a07b025 100644 --- a/lib/dpkg/parse.c +++ b/lib/dpkg/parse.c @@ -201,8 +201,10 @@ pkg_parse_verify(struct parsedb_state *ps, else if (pkgbin->arch->type == arch_empty) parse_warn(ps, _("empty value for %s"), "architecture"); } - if (pkgbin->arch->type == arch_empty) - pkgbin->arch = dpkg_arch_get(arch_none); + /* Mark missing architectures as empty, to distinguish these from + * unused slots in the db. */ + if (pkgbin->arch->type == arch_none) + pkgbin->arch = dpkg_arch_get(arch_empty); if (pkgbin->arch->type == arch_all && pkgbin->multiarch == multiarch_same) parse_error(ps, _("package has field '%s' but is architecture all"), -- dpkg's main repository -- To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org