about summary refs log tree commit diff
path: root/scripts/nix-channel.in
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-04-16T17·52+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-04-16T17·52+0200
commit8cf1719e3e02998c0d22ed9e505a4a98e3335627 (patch)
tree1a6ad00d9b395aa2645b0c5fd090baaaac6be02c /scripts/nix-channel.in
parent1132dd27eaf6b32937f1e0508c84d08f5ae90470 (diff)
Hack to prevent accumulation of old manifests
Diffstat (limited to 'scripts/nix-channel.in')
-rwxr-xr-xscripts/nix-channel.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/nix-channel.in b/scripts/nix-channel.in
index 64e5aa01282b..2bf5e633e85b 100755
--- a/scripts/nix-channel.in
+++ b/scripts/nix-channel.in
@@ -88,6 +88,7 @@ sub update {
     my $exprs = "";
     foreach my $name (keys %channels) {
         my $url = $channels{$name};
+        my $origUrl = $url;
 
         # Check if $url is a redirect.  If so, follow it now to ensure
         # consistency if the redirection is changed between
@@ -98,6 +99,7 @@ sub update {
         $url = $1 if $headers =~ /^Location:\s*(.*)\s*$/m;
         
         # Pull the channel manifest.
+        $ENV{'NIX_ORIG_URL'} = $origUrl;
         system("$Nix::Config::binDir/nix-pull", "--skip-wrong-store", "$url/MANIFEST") == 0
             or die "cannot pull manifest from `$url'\n";