aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-05-07 17:23:26 -0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-05-07 17:23:26 -0400
commit147f10157fef48dcf3e32511e10f5ee00026b757 (patch)
tree9bae7675f1a9fb417c6e9372dae11441662d34d1 /scripts
parent464089365e2c72c83e5a8edb5611e537c4898501 (diff)
Now *really* prevent accumulation of old manifests
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/nix-pull.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in
index 8d5db2f57..e59a38eec 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 = <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";