* Ignore hash conflicts in gc-releases.pl.
This commit is contained in:
parent
67eff20906
commit
7272c3f817
|
@ -32,7 +32,7 @@ my %successors;
|
||||||
|
|
||||||
foreach my $manifest (@ARGV) {
|
foreach my $manifest (@ARGV) {
|
||||||
print STDERR "loading $manifest\n";
|
print STDERR "loading $manifest\n";
|
||||||
if (readManifest($manifest, \%narFiles, \%patches, \%successors) < 3) {
|
if (readManifest($manifest, \%narFiles, \%patches, \%successors, 1) < 3) {
|
||||||
# die "manifest `$manifest' is too old (i.e., for Nix <= 0.7)\n";
|
# die "manifest `$manifest' is too old (i.e., for Nix <= 0.7)\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -328,7 +328,7 @@ foreach my $p (keys %dstOutPaths) {
|
||||||
{ url => "$patchesURL/$finalName", hash => "$hashAlgo:$narDiffHash"
|
{ url => "$patchesURL/$finalName", hash => "$hashAlgo:$narDiffHash"
|
||||||
, size => $narDiffSize, basePath => $closest, baseHash => "$hashAlgo:$baseHash"
|
, size => $narDiffSize, basePath => $closest, baseHash => "$hashAlgo:$baseHash"
|
||||||
, narHash => "$hashAlgo:$narHash", patchType => "nar-bsdiff"
|
, narHash => "$hashAlgo:$narHash", patchType => "nar-bsdiff"
|
||||||
};
|
}, 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ sub addPatch {
|
||||||
my $patches = shift;
|
my $patches = shift;
|
||||||
my $storePath = shift;
|
my $storePath = shift;
|
||||||
my $patch = shift;
|
my $patch = shift;
|
||||||
|
my $allowConflicts = shift;
|
||||||
|
|
||||||
$$patches{$storePath} = []
|
$$patches{$storePath} = []
|
||||||
unless defined $$patches{$storePath};
|
unless defined $$patches{$storePath};
|
||||||
|
@ -18,7 +19,8 @@ sub addPatch {
|
||||||
$found = 1 if ($patch2->{basePath} eq $patch->{basePath});
|
$found = 1 if ($patch2->{basePath} eq $patch->{basePath});
|
||||||
} else {
|
} else {
|
||||||
die "conflicting hashes for URL $patch->{url}, " .
|
die "conflicting hashes for URL $patch->{url}, " .
|
||||||
"namely $patch2->{hash} and $patch->{hash}";
|
"namely $patch2->{hash} and $patch->{hash}"
|
||||||
|
unless $allowConflicts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,6 +36,8 @@ sub readManifest {
|
||||||
my $narFiles = shift;
|
my $narFiles = shift;
|
||||||
my $patches = shift;
|
my $patches = shift;
|
||||||
my $successors = shift;
|
my $successors = shift;
|
||||||
|
my $allowConflicts = shift;
|
||||||
|
$allowConflicts = 0 unless defined $allowConflicts;
|
||||||
|
|
||||||
open MANIFEST, "<$manifest"
|
open MANIFEST, "<$manifest"
|
||||||
or die "cannot open `$manifest': $!";
|
or die "cannot open `$manifest': $!";
|
||||||
|
@ -100,7 +104,8 @@ sub readManifest {
|
||||||
$found = 1;
|
$found = 1;
|
||||||
} else {
|
} else {
|
||||||
die "conflicting hashes for URL $url, " .
|
die "conflicting hashes for URL $url, " .
|
||||||
"namely $narFile->{hash} and $hash";
|
"namely $narFile->{hash} and $hash"
|
||||||
|
unless $allowConflicts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,7 +129,7 @@ sub readManifest {
|
||||||
, basePath => $basePath, baseHash => $baseHash
|
, basePath => $basePath, baseHash => $baseHash
|
||||||
, narHash => $narHash, patchType => $patchType
|
, narHash => $narHash, patchType => $patchType
|
||||||
, hashAlgo => $hashAlgo
|
, hashAlgo => $hashAlgo
|
||||||
};
|
}, $allowConflicts;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue