diff options
Diffstat (limited to 'scripts/download-using-manifests.pl.in')
-rw-r--r-- | scripts/download-using-manifests.pl.in | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/scripts/download-using-manifests.pl.in b/scripts/download-using-manifests.pl.in index 4ae24067b3d5..1d46de533d04 100644 --- a/scripts/download-using-manifests.pl.in +++ b/scripts/download-using-manifests.pl.in @@ -19,11 +19,10 @@ my $fast = 1; # Load all manifests. my %narFiles; -my %localPaths; my %patches; for my $manifest (glob "$manifestDir/*.nixmanifest") { - my $version = readManifest($manifest, \%narFiles, \%localPaths, \%patches); + my $version = readManifest($manifest, \%narFiles, \%patches); if ($version < 3) { print STDERR "you have an old-style manifest `$manifest'; please delete it\n"; exit 1; @@ -189,8 +188,7 @@ if ($ARGV[0] eq "--query") { if ($cmd eq "have") { my $storePath = <STDIN>; chomp $storePath; - print STDOUT ((defined $narFiles{$storePath} or defined $localPaths{$storePath}) - ? "1\n" : "0\n"); + print STDOUT (defined $narFiles{$storePath} ? "1\n" : "0\n"); } elsif ($cmd eq "info") { @@ -200,9 +198,6 @@ if ($ARGV[0] eq "--query") { if (defined $narFiles{$storePath}) { $info = @{$narFiles{$storePath}}[0]; } - elsif (defined $localPaths{$storePath}) { - $info = @{$localPaths{$storePath}}[0]; - } else { print "0\n"; next; # not an error @@ -267,19 +262,6 @@ print LOGFILE "$$ get $targetPath $date\n"; print "\n*** Trying to download/patch `$targetPath'\n"; -# If we can copy from a local path, do that. -my $localPathList = $localPaths{$targetPath}; -foreach my $localPath (@{$localPathList}) { - my $sourcePath = $localPath->{copyFrom}; - if (-e $sourcePath) { - print "\n*** Step 1/1: copying from $sourcePath\n"; - system("$binDir/nix-store --dump $sourcePath | $binDir/nix-store --restore $targetPath") == 0 - or die "cannot copy `$sourcePath' to `$targetPath'"; - exit 0; - } -} - - # Compute the shortest path. my @path = computeSmallestDownload $targetPath; die "don't know how to produce $targetPath\n" if scalar @path == 0; |