]> git.proxmox.com Git - dab.git/commitdiff
fix compressor loop-order
authorStoiko Ivanov <s.ivanov@proxmox.com>
Wed, 14 Jul 2021 16:52:04 +0000 (18:52 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 15 Jul 2021 09:29:51 +0000 (11:29 +0200)
commit dbac106eb6e3cff405e57c0bb6a6dbe3cf307c52 introduced a flaw in
the logic - once a file is downloaded the 'last;' statement exited the
inner loop iterating over the compoentens instead of the outer one
iterating over the compressors.

since both do not inherently depend on each other simply swap them.

noticed while trying to build a pmg-template in a clean environment
with full repository configuration (before the tests worked due to
leftover files in the infodir)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
DAB.pm

diff --git a/DAB.pm b/DAB.pm
index b81321eedf85df8d70a3d4c8e72299a5ad50ac6d..9282789324ce6ac63dcf684494f254cba33ee97c 100644 (file)
--- a/DAB.pm
+++ b/DAB.pm
@@ -648,8 +648,8 @@ sub initialize {
            warn "Release info ignored\n";
        };
 
-       foreach my $compressor (@$COMPRESSORS) {
-           foreach my $comp (@{$ss->{comp}}) {
+       foreach my $comp (@{$ss->{comp}}) {
+           foreach my $compressor (@$COMPRESSORS) {
                $path = "dists/$ss->{suite}/$comp/binary-$arch/Packages.$compressor->{ext}";
                $target = "$infodir/" . __url_to_filename ("$ss->{source}/$path");
                my $pkgsrc = "$src/$path";