From 147f10157fef48dcf3e32511e10f5ee00026b757 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 7 May 2012 17:23:26 -0400 Subject: Now *really* prevent accumulation of old manifests --- scripts/nix-pull.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in index 8d5db2f57c68..e59a38eec79f 100755 --- a/scripts/nix-pull.in +++ b/scripts/nix-pull.in @@ -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 = ; 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"; -- cgit 1.4.1