]> err.no Git - dpkg/commitdiff
Dpkg::Arch: Instead of printing make get_valid_arches return an array
authorGuillem Jover <guillem@debian.org>
Sun, 4 Nov 2007 00:05:14 +0000 (02:05 +0200)
committerGuillem Jover <guillem@debian.org>
Thu, 15 Nov 2007 22:21:53 +0000 (00:21 +0200)
ChangeLog
scripts/Dpkg/Arch.pm

index da778b5ada0d8e14d40b6772519e200b58c7f156..c46d2c9acfe8bba76488424d921e9a36f1a1d19e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-04  Guillem Jover  <guillem@debian.org>
+
+       * scripts/Dpkg/Arch.pm (get_valid_arches): Return an array instead of
+       printing the architectures.
+
 2007-10-18  Raphael Hertzog  <hertzog@debian.org>
 
        * scripts/Dpkg/Deps.pm: new module to handle dependencies, to
index 3cf7e4dd1a09cc73d1dc51fac13888708d32559c..7ffca35b4bd88c30b82f74733e9187fd184c8a85 100644 (file)
@@ -38,12 +38,16 @@ sub get_valid_arches()
     read_cputable() if (!@cpu);
     read_ostable() if (!@os);
 
+    my @arches;
+
     foreach my $os (@os) {
        foreach my $cpu (@cpu) {
            my $arch = debtriplet_to_debarch(split(/-/, $os, 2), $cpu);
-           print $arch."\n" if defined($arch);
+           push @arches, $arch if defined($arch);
        }
     }
+
+    return @arches;
 }
 
 sub read_cputable