* Fedora 11 uses SHA-256 hashes instead of SHA-1 in primary.xml.

svn path=/nixpkgs/trunk/; revision=15908
This commit is contained in:
Eelco Dolstra 2009-06-09 14:25:45 +00:00
parent d8cc981d90
commit 813909d153

View File

@ -103,10 +103,15 @@ print "[\n\n";
foreach my $pkgName (@needed) {
my $pkg = $pkgs{$pkgName};
die if $pkg->{checksum}->{type} ne "sha";
print " (fetchurl {\n";
print " url = $urlPrefix/$pkg->{location}->{href};\n";
print " sha1 = \"$pkg->{checksum}->{content}\";\n";
if ($pkg->{checksum}->{type} eq "sha") {
print " sha1 = \"$pkg->{checksum}->{content}\";\n";
} elsif ($pkg->{checksum}->{type} eq "sha256") {
print " sha256 = \"$pkg->{checksum}->{content}\";\n";
} else {
die "unsupported hash type";
}
print " })\n";
print "\n";
}