]> git.donarmstrong.com Git - debhelper.git/commitdiff
minor code cleanup and optimisation
authorJoey Hess <joey@gnu.kitenet.net>
Mon, 10 Aug 2009 19:08:09 +0000 (15:08 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Mon, 10 Aug 2009 19:08:09 +0000 (15:08 -0400)
Debian/Debhelper/Dh_Lib.pm

index 28a90f7bdad16b37900c7021d9b055f2d8f6388b..a546dbf5e902f34835583d66848584ccedfe1a4a 100644 (file)
@@ -681,12 +681,6 @@ sub getpackages {
        %package_arches=();
        
        $type="" if ! defined $type;
-       
-       # Look up the build arch if we need to.
-       my $buildarch='';
-       if ($type eq 'same') {
-               $buildarch=buildarch();
-       }
 
        my $package="";
        my $arch="";
@@ -724,7 +718,8 @@ sub getpackages {
                        if ($package &&
                            (($type eq 'indep' && $arch eq 'all') ||
                             ($type eq 'arch' && $arch ne 'all') ||
-                            ($type eq 'same' && ($arch eq 'any' || samearch($buildarch, $arch))) ||
+                            ($type eq 'same' && ($arch eq 'any' ||
+                                            samearch(buildarch(), $arch))) ||
                             ! $type)) {
                                push @list, $package;
                                $package="";