The following commit has been merged in the master branch: commit 2ed0a42cb3863e2ce0199e13242fa3b769ca773d Author: Guillem Jover <guil...@debian.org> Date: Tue May 24 06:19:28 2011 +0200
libdpkg: Do not warn on missing Architecture in config-files state dpkg before commit 2ef42b027e4267432a41343e28f102b1dae668d2 (versions older than 1.10.19) did not keep the Architecture field in the status file, and as such removed (but not purged) packages might still be around in live systems lacking the Architecture field. Let's shut up the warning for now. Closes: #604241 Analysis-by: Raphael Hertzog <hert...@debian.org> Signed-off-by: Guillem Jover <guil...@debian.org> diff --git a/debian/changelog b/debian/changelog index 60d859e..365ea39 100644 --- a/debian/changelog +++ b/debian/changelog @@ -71,6 +71,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low * Add ‘.hgsigs’ to the default dpkg-source ignore lists. Based on a patch by Jakub Wilk <jw...@debian.org>. Closes: #627462 * Do not allow blank lines in field values. Closes: #308082 + * Do not warn on missing architecture on packages in config-files state, + but then make sure the architecture field is usable. Closes: #604241 [ Updated dpkg translations ] * German (Sven Joachim). Closes: #620312 diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c index f71c438..58b3110 100644 --- a/lib/dpkg/parse.c +++ b/lib/dpkg/parse.c @@ -177,11 +177,19 @@ pkg_parse_verify(struct parsedb_state *ps, parse_ensure_have_field(ps, pkg, &pkgbin->description, "description"); parse_ensure_have_field(ps, pkg, &pkgbin->maintainer, "maintainer"); parse_must_have_field(ps, pkg, pkgbin->version.version, "version"); + } + /* XXX: Versions before dpkg 1.10.19 did not preserve the Architecture + * field in the status file. So there's still live systems with packages + * in stat_configfiles, ignore those too for now. */ + if ((ps->flags & pdb_recordavailable) || + pkg->status > stat_halfinstalled) { /* We always want usable architecture information (as long as the package * is in such a state that it make sense), so that it can be used safely * on string comparisons and the like. */ parse_ensure_have_field(ps, pkg, &pkgbin->arch, "architecture"); + } else if (pkgbin->arch == NULL) { + pkgbin->arch = ""; } /* Check the Config-Version information: -- 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