The following commit has been merged in the master branch:
commit afcdfe571e8d20832996ec8d4593744fab3b52c1
Author: Guillem Jover <[email protected]>
Date:   Mon Jun 29 09:23:17 2009 +0200

    dpkg-name: Fix inverted logic when deciding to assume the architecture
    
    This gets triggered when the package does not have such field.

diff --git a/debian/changelog b/debian/changelog
index 12d28ee..bc05dc6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 dpkg (1.15.4) UNRELEASED; urgency=low
 
   * Call _g instead of g_ in dpkg-name.
+  * Fix inverted logic when deciding to assume the architecture in dpkg-name
+    when the package didn't have such field.
 
  -- Guillem Jover <[email protected]>  Sat, 27 Jun 2009 19:25:30 +0200
 
diff --git a/scripts/dpkg-name.pl b/scripts/dpkg-name.pl
index eab33e4..0c6b96b 100755
--- a/scripts/dpkg-name.pl
+++ b/scripts/dpkg-name.pl
@@ -108,7 +108,7 @@ sub getarch($$)
     my ($filename, $fields) = @_;
 
     my $arch = $fields->{Architecture};
-    if (!$fields->{Architecture} and !$options{architecture}) {
+    if (!$fields->{Architecture} and $options{architecture}) {
         $arch = get_host_arch();
         warning(_g("assuming architecture '%s' for '%s'"), $arch, $filename);
     }

-- 
dpkg's main repository


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

Reply via email to