Author: eelco
Date: Wed Apr 6 09:16:22 2011
New Revision: 26708
URL: https://svn.nixos.org/websvn/nix/?rev=26708&sc=1
Log:
* Remove the localPaths feature in manifests since it's no longer used
and redundant anyway.
Modified:
nix/trunk/scripts/NixManifest.pm.in
nix/trunk/scripts/download-using-manifests.pl.in
nix/trunk/scripts/maintenance/gc-releases.pl
nix/trunk/scripts/nix-generate-patches.in
nix/trunk/scripts/nix-pull.in
nix/trunk/scripts/remove-patches.pl
nix/trunk/scripts/update-manifest.pl
Modified: nix/trunk/scripts/NixManifest.pm.in
==============================================================================
--- nix/trunk/scripts/NixManifest.pm.in Wed Apr 6 05:22:10 2011 (r26707)
+++ nix/trunk/scripts/NixManifest.pm.in Wed Apr 6 09:16:22 2011 (r26708)
@@ -23,7 +23,7 @@
sub readManifest {
- my ($manifest, $narFiles, $localPaths, $patches) = @_;
+ my ($manifest, $narFiles, $patches) = @_;
open MANIFEST, "<$manifest"
or die "cannot open `$manifest': $!";
@@ -99,21 +99,6 @@
};
}
- 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; }
Modified: nix/trunk/scripts/download-using-manifests.pl.in
==============================================================================
--- nix/trunk/scripts/download-using-manifests.pl.in Wed Apr 6 05:22:10
2011 (r26707)
+++ nix/trunk/scripts/download-using-manifests.pl.in Wed Apr 6 09:16:22
2011 (r26708)
@@ -19,11 +19,10 @@
# 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 ($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 (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 "\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;
Modified: nix/trunk/scripts/maintenance/gc-releases.pl
==============================================================================
--- nix/trunk/scripts/maintenance/gc-releases.pl Wed Apr 6 05:22:10
2011 (r26707)
+++ nix/trunk/scripts/maintenance/gc-releases.pl Wed Apr 6 09:16:22
2011 (r26708)
@@ -7,12 +7,11 @@
# 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";
}
}
Modified: nix/trunk/scripts/nix-generate-patches.in
==============================================================================
--- nix/trunk/scripts/nix-generate-patches.in Wed Apr 6 05:22:10 2011
(r26707)
+++ nix/trunk/scripts/nix-generate-patches.in Wed Apr 6 09:16:22 2011
(r26708)
@@ -26,10 +26,10 @@
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";
Modified: nix/trunk/scripts/nix-pull.in
==============================================================================
--- nix/trunk/scripts/nix-pull.in Wed Apr 6 05:22:10 2011 (r26707)
+++ nix/trunk/scripts/nix-pull.in Wed Apr 6 09:16:22 2011 (r26708)
@@ -26,7 +26,6 @@
# Process the URLs specified on the command line.
my %narFiles;
-my %localPaths;
my %patches;
my $skipWrongStore = 0;
@@ -70,7 +69,7 @@
$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 @@
}
-my $size = scalar (keys %narFiles) + scalar (keys %localPaths);
+my $size = scalar (keys %narFiles);
print "$size store paths in manifest\n";
Modified: nix/trunk/scripts/remove-patches.pl
==============================================================================
--- nix/trunk/scripts/remove-patches.pl Wed Apr 6 05:22:10 2011 (r26707)
+++ nix/trunk/scripts/remove-patches.pl Wed Apr 6 09:16:22 2011 (r26708)
@@ -6,10 +6,9 @@
for my $p (@ARGV) {
my %narFiles;
- my %localPaths;
my %patches;
- readManifest $p, \%narFiles, \%localPaths, \%patches;
+ readManifest $p, \%narFiles, \%patches;
%patches = ();
Modified: nix/trunk/scripts/update-manifest.pl
==============================================================================
--- nix/trunk/scripts/update-manifest.pl Wed Apr 6 05:22:10 2011
(r26707)
+++ nix/trunk/scripts/update-manifest.pl Wed Apr 6 09:16:22 2011
(r26708)
@@ -8,10 +8,9 @@
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};
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits