Explorar o código

dpkg-name: Fix inverted logic when deciding to assume the architecture

This gets triggered when the package does not have such field.
Guillem Jover %!s(int64=17) %!d(string=hai) anos
pai
achega
afcdfe571e
Modificáronse 2 ficheiros con 3 adicións e 1 borrados
  1. 2 0
      debian/changelog
  2. 1 1
      scripts/dpkg-name.pl

+ 2 - 0
debian/changelog

@@ -1,6 +1,8 @@
 dpkg (1.15.4) UNRELEASED; urgency=low
 dpkg (1.15.4) UNRELEASED; urgency=low
 
 
   * Call _g instead of g_ in dpkg-name.
   * 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 <guillem@debian.org>  Sat, 27 Jun 2009 19:25:30 +0200
  -- Guillem Jover <guillem@debian.org>  Sat, 27 Jun 2009 19:25:30 +0200
 
 

+ 1 - 1
scripts/dpkg-name.pl

@@ -108,7 +108,7 @@ sub getarch($$)
     my ($filename, $fields) = @_;
     my ($filename, $fields) = @_;
 
 
     my $arch = $fields->{Architecture};
     my $arch = $fields->{Architecture};
-    if (!$fields->{Architecture} and !$options{architecture}) {
+    if (!$fields->{Architecture} and $options{architecture}) {
         $arch = get_host_arch();
         $arch = get_host_arch();
         warning(_g("assuming architecture '%s' for '%s'"), $arch, $filename);
         warning(_g("assuming architecture '%s' for '%s'"), $arch, $filename);
     }
     }