diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-04-06 09:16:22 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-04-06 09:16:22 +0000 |
commit | 1e7e4f21ba910bcf9da89b14cf2424a4b0955bed (patch) | |
tree | d7fc709bf97d96ce11a5d9e8117286ff5ff9446b | |
parent | 0423d0692abebf16a19b65b37d4926de2539bf1c (diff) | |
download | guix-1e7e4f21ba910bcf9da89b14cf2424a4b0955bed.tar.gz |
* Remove the localPaths feature in manifests since it's no longer used
and redundant anyway.
-rw-r--r-- | scripts/NixManifest.pm.in | 17 | ||||
-rw-r--r-- | scripts/download-using-manifests.pl.in | 22 | ||||
-rwxr-xr-x | scripts/maintenance/gc-releases.pl | 3 | ||||
-rw-r--r-- | scripts/nix-generate-patches.in | 4 | ||||
-rw-r--r-- | scripts/nix-pull.in | 5 | ||||
-rwxr-xr-x | scripts/remove-patches.pl | 3 | ||||
-rwxr-xr-x | scripts/update-manifest.pl | 3 |
7 files changed, 10 insertions, 47 deletions
diff --git a/scripts/NixManifest.pm.in b/scripts/NixManifest.pm.in index be0dda6169..21c8b6ba2a 100644 --- a/scripts/NixManifest.pm.in +++ b/scripts/NixManifest.pm.in @@ -23,7 +23,7 @@ sub addPatch { sub readManifest { - my ($manifest, $narFiles, $localPaths, $patches) = @_; + my ($manifest, $narFiles, $patches) = @_; open MANIFEST, "<$manifest" or die "cannot open `$manifest': $!"; @@ -99,21 +99,6 @@ sub readManifest { }; } - elsif ($type eq "localPath") { - - $$localPaths{$storePath} = [] - unless defined $$localPaths{$storePath}; - - my $localPathsList = $$localPaths{$storePath}; - - # !!! remove duplicates - - push @{$localPathsList}, - { copyFrom => $copyFrom, references => $references - , deriver => "" - }; - } - } elsif (/^\s*StorePath:\s*(\/\S+)\s*$/) { $storePath = $1; } diff --git a/scripts/download-using-manifests.pl.in b/scripts/download-using-manifests.pl.in index 4ae24067b3..1d46de533d 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; diff --git a/scripts/maintenance/gc-releases.pl b/scripts/maintenance/gc-releases.pl index b8abb03477..80b2726c5a 100755 --- a/scripts/maintenance/gc-releases.pl +++ b/scripts/maintenance/gc-releases.pl @@ -7,12 +7,11 @@ use readcache; # Read the manifests. my %narFiles; -my %localPaths; my %patches; foreach my $manifest (@ARGV) { print STDERR "loading $manifest\n"; - if (readManifest($manifest, \%narFiles, \%localPaths, \%patches, 1) < 3) { + if (readManifest($manifest, \%narFiles, \%patches, 1) < 3) { # die "manifest `$manifest' is too old (i.e., for Nix <= 0.7)\n"; } } diff --git a/scripts/nix-generate-patches.in b/scripts/nix-generate-patches.in index c96cc704a1..dc5c3bf68e 100644 --- a/scripts/nix-generate-patches.in +++ b/scripts/nix-generate-patches.in @@ -26,10 +26,10 @@ my $srcManifest = $ARGV[3]; my $dstManifest = $ARGV[4]; my (%srcNarFiles, %srcLocalPaths, %srcPatches); -readManifest $srcManifest, \%srcNarFiles, \%srcLocalPaths, \%srcPatches; +readManifest $srcManifest, \%srcNarFiles, \%srcPatches; my (%dstNarFiles, %dstLocalPaths, %dstPatches); -readManifest $dstManifest, \%dstNarFiles, \%dstLocalPaths, \%dstPatches; +readManifest $dstManifest, \%dstNarFiles, \%dstPatches; my $tmpDir = tempdir("nix-generate-patches.XXXXXX", CLEANUP => 1, TMPDIR => 1) or die "cannot create a temporary directory"; diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in index f3b533ff7a..8ea78d10d3 100644 --- a/scripts/nix-pull.in +++ b/scripts/nix-pull.in @@ -26,7 +26,6 @@ if (! -e $manifestDir) { # Process the URLs specified on the command line. my %narFiles; -my %localPaths; my %patches; my $skipWrongStore = 0; @@ -70,7 +69,7 @@ sub processURL { $manifest = downloadFile $url; } - my $version = readManifest($manifest, \%narFiles, \%localPaths, \%patches); + my $version = readManifest($manifest, \%narFiles, \%patches); die "`$url' is not a manifest or it is too old (i.e., for Nix <= 0.7)\n" if $version < 3; die "manifest `$url' is too new\n" if $version >= 5; @@ -129,5 +128,5 @@ while (@ARGV) { } -my $size = scalar (keys %narFiles) + scalar (keys %localPaths); +my $size = scalar (keys %narFiles); print "$size store paths in manifest\n"; diff --git a/scripts/remove-patches.pl b/scripts/remove-patches.pl index 1a94dfa164..401771a27d 100755 --- a/scripts/remove-patches.pl +++ b/scripts/remove-patches.pl @@ -6,10 +6,9 @@ use readmanifest; for my $p (@ARGV) { my %narFiles; - my %localPaths; my %patches; - readManifest $p, \%narFiles, \%localPaths, \%patches; + readManifest $p, \%narFiles, \%patches; %patches = (); diff --git a/scripts/update-manifest.pl b/scripts/update-manifest.pl index ac0ce749d9..566f646732 100755 --- a/scripts/update-manifest.pl +++ b/scripts/update-manifest.pl @@ -8,10 +8,9 @@ die unless scalar @ARGV == 2; my $cache = $ARGV[0]; my $manifest = $ARGV[1]; my %narFiles; -my %localPaths; my %patches; -readManifest $manifest, \%narFiles, \%localPaths, \%patches; +readManifest $manifest, \%narFiles, \%patches; foreach my $storePath (keys %narFiles) { my $narFileList = $narFiles{$storePath}; |