forked from lix-project/lix
Now *really* prevent accumulation of old manifests
This commit is contained in:
parent
464089365e
commit
147f10157f
|
@ -49,6 +49,8 @@ sub processURL {
|
|||
|
||||
my $manifest;
|
||||
|
||||
my $origUrl = $ENV{'NIX_ORIG_URL'} || $url;
|
||||
|
||||
# First see if a bzipped manifest is available.
|
||||
if (system("$Nix::Config::curl --fail --silent --location --head '$url'.bz2 > /dev/null") == 0) {
|
||||
print "fetching list of Nix archives at `$url.bz2'...\n";
|
||||
|
@ -72,7 +74,7 @@ sub processURL {
|
|||
|
||||
my $urlFile = "$manifestDir/$baseName-$hash.url";
|
||||
open URL, ">$urlFile" or die "cannot create `$urlFile'";
|
||||
print URL ($ENV{'NIX_ORIG_URL'} || $url);
|
||||
print URL $origUrl;
|
||||
close URL;
|
||||
|
||||
my $finalPath = "$manifestDir/$baseName-$hash.nixmanifest";
|
||||
|
@ -89,7 +91,7 @@ sub processURL {
|
|||
my $url2 = <URL>;
|
||||
chomp $url2;
|
||||
close URL;
|
||||
next unless $url eq $url2;
|
||||
next unless $origUrl eq $url2;
|
||||
my $base = $urlFile2; $base =~ s/.url$//;
|
||||
unlink "${base}.url";
|
||||
unlink "${base}.nixmanifest";
|
||||
|
|
Loading…
Reference in a new issue