The following commit has been merged in the master branch:
commit 7e6096c21592bca4349e885701441d21dc6b7ac6
Author: Raphaël Hertzog <[email protected]>
Date:   Tue Apr 23 12:15:06 2013 +0200

    Dpkg::Arch: Multiple fixes to cope with empty triplets
    
    With the changes introduced in 26a4d1df1119da0a8601b27198086086f9f3249f
    debarch_to_debtriplet() and debwildcard_to_debtriplet() can now return an
    empty list () instead of (undef) and the logic needs to be adjusted in
    multiple place to cope with those changes.
    
    The fixes in this commit might not be exhaustive, they correspond to
    warnings that dpkg-source has been emitting. But given the number of
    similar changes in the above commit, it's impossible for me to review
    everything.

diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm
index 3ee450a..56d3206 100644
--- a/scripts/Dpkg/Arch.pm
+++ b/scripts/Dpkg/Arch.pm
@@ -399,7 +399,7 @@ sub debarch_eq($$)
     my @a = debarch_to_debtriplet($a);
     my @b = debarch_to_debtriplet($b);
 
-    return 0 if grep(!defined, (@a, @b));
+    return 0 if grep(!defined, (@a, @b)) or !scalar(@a) or !scalar(@b);
 
     return ($a[0] eq $b[0] && $a[1] eq $b[1] && $a[2] eq $b[2]);
 }
@@ -413,7 +413,7 @@ sub debarch_is($$)
     my @real = debarch_to_debtriplet($real);
     my @alias = debwildcard_to_debtriplet($alias);
 
-    return 0 if grep(!defined, (@real, @alias));
+    return 0 if grep(!defined, (@real, @alias)) or !scalar(@real) or 
!scalar(@alias);
 
     if (($alias[0] eq $real[0] || $alias[0] eq 'any') &&
         ($alias[1] eq $real[1] || $alias[1] eq 'any') &&

-- 
dpkg's main repository


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

Reply via email to