about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-03-14T18·55+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-03-14T18·55+0000
commit6fb5f7e532bf43ecf02004a4010496e9f98d09bc (patch)
tree152ec273844dedb50404e5c7c2a0b41b1f326a33
parentc757d16c8c180bc8a7d74494a2fc92aee7993631 (diff)
* Pass `--base32' unless using MD5.
-rw-r--r--scripts/download-using-manifests.pl.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/download-using-manifests.pl.in b/scripts/download-using-manifests.pl.in
index 487efaba0665..4dbc2396f79b 100644
--- a/scripts/download-using-manifests.pl.in
+++ b/scripts/download-using-manifests.pl.in
@@ -109,7 +109,9 @@ while ($queueFront < scalar @queue) {
             if (isValidPath($patch->{basePath})) {
                 # !!! this should be cached
                 my ($baseHashAlgo, $baseHash) = parseHash $patch->{baseHash};
-                my $hash = `@bindir@/nix-hash --type '$baseHashAlgo' "$patch->{basePath}"`;
+                my $format = "--base32";
+                $format = "" if $baseHashAlgo eq "md5";
+                my $hash = `@bindir@/nix-hash --type '$baseHashAlgo' $format "$patch->{basePath}"`;
                 chomp $hash;
 #                print "  MY HASH is $hash\n";
                 if ($hash ne $baseHash) {