* Fedora 11 uses SHA-256 hashes instead of SHA-1 in primary.xml.
svn path=/nixpkgs/trunk/; revision=15908
This commit is contained in:
parent
d8cc981d90
commit
813909d153
@ -103,10 +103,15 @@ print "[\n\n";
|
|||||||
|
|
||||||
foreach my $pkgName (@needed) {
|
foreach my $pkgName (@needed) {
|
||||||
my $pkg = $pkgs{$pkgName};
|
my $pkg = $pkgs{$pkgName};
|
||||||
die if $pkg->{checksum}->{type} ne "sha";
|
|
||||||
print " (fetchurl {\n";
|
print " (fetchurl {\n";
|
||||||
print " url = $urlPrefix/$pkg->{location}->{href};\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";
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user