* Pass `--base32' unless using MD5.

This commit is contained in:
Eelco Dolstra 2005-03-14 18:55:29 +00:00
parent c757d16c8c
commit 6fb5f7e532
1 changed files with 3 additions and 1 deletions

View File

@ -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) {