The following commit has been merged in the master branch:
commit f3496dc24f98cea0e1da3c812e8c728c45875f48
Author: Guillem Jover <[email protected]>
Date:   Mon Jan 31 19:17:35 2011 +0100

    libdpkg: Do not print bogus warnings when parsing status files
    
    This is the equivalent fix in spirit as the one in commit
    672b0664cbb8fd7fd5eea7ab10af1bbf6871833f, but applied to the
    Architecture field instead.
    
    Reported-by: Raphaël Hertzog <[email protected]>

diff --git a/debian/changelog b/debian/changelog
index a4cbd45..3ccbae0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -26,7 +26,8 @@ dpkg (1.16.0) UNRELEASED; urgency=low
     happen either on distributions where dpkg is a foreign package manager,
     or on artificial dpkg databases.
   * Always warn when parsing any package control data which does not have
-    an Architecture field.
+    an Architecture field except for status and status log files when
+    packages are not-installed or half-installed.
 
   [ Raphaël Hertzog ]
   * Fail properly when debian/source/format is empty. Closes: #600854
diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c
index fc94ce5..58a1daf 100644
--- a/lib/dpkg/parse.c
+++ b/lib/dpkg/parse.c
@@ -167,11 +167,12 @@ 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");
-  }
 
-  /* We always want usable architecture information, so that it can be used
-   * safely on string comparisons and the like. */
-  parse_ensure_have_field(ps, pkg, &pkgbin->arch, "architecture");
+    /* 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");
+  }
 
   /* Check the Config-Version information:
    * If there is a Config-Version it is definitely to be used, but

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to