diff options
-rw-r--r-- | scripts/download-using-manifests.pl.in | 3 | ||||
-rwxr-xr-x | scripts/generate-patches.pl.in | 13 | ||||
-rwxr-xr-x | scripts/maintenance/gc-releases.pl | 3 | ||||
-rwxr-xr-x | scripts/maintenance/shrink-manifest.pl | 6 | ||||
-rw-r--r-- | scripts/nix-pull.in | 3 | ||||
-rw-r--r-- | scripts/readmanifest.pm.in | 9 | ||||
-rwxr-xr-x | scripts/remove-patches.pl | 5 | ||||
-rwxr-xr-x | scripts/update-manifest.pl | 5 |
8 files changed, 15 insertions, 32 deletions
diff --git a/scripts/download-using-manifests.pl.in b/scripts/download-using-manifests.pl.in index 2ef98e3466b1..e02d82c140f7 100644 --- a/scripts/download-using-manifests.pl.in +++ b/scripts/download-using-manifests.pl.in @@ -35,11 +35,10 @@ print "\n*** Trying to download/patch `$targetPath'\n"; # Load all manifests. my %narFiles; my %patches; -my %successors; for my $manifest (glob "$manifestDir/*.nixmanifest") { # print STDERR "reading $manifest\n"; - if (readManifest($manifest, \%narFiles, \%patches, \%successors) < 3) { + if (readManifest($manifest, \%narFiles, \%patches) < 3) { print STDERR "you have an old-style manifest `$manifest'; please delete it\n"; exit 1; } diff --git a/scripts/generate-patches.pl.in b/scripts/generate-patches.pl.in index 67a6adaa7113..9e355f6aee28 100755 --- a/scripts/generate-patches.pl.in +++ b/scripts/generate-patches.pl.in @@ -29,22 +29,19 @@ print "TEMP = $tmpDir\n"; my %srcNarFiles; my %srcPatches; -my %srcSuccessors; my %dstNarFiles; my %dstPatches; -my %dstSuccessors; readManifest "$srcDir/MANIFEST", - \%srcNarFiles, \%srcPatches, \%srcSuccessors; + \%srcNarFiles, \%srcPatches; readManifest "$dstDir/MANIFEST", - \%dstNarFiles, \%dstPatches, \%dstSuccessors; + \%dstNarFiles, \%dstPatches; sub findOutputPaths { my $narFiles = shift; - my $successors = shift; my %outPaths; @@ -69,10 +66,10 @@ sub findOutputPaths { } print "finding src output paths...\n"; -my %srcOutPaths = findOutputPaths \%srcNarFiles, \%srcSuccessors; +my %srcOutPaths = findOutputPaths \%srcNarFiles; print "finding dst output paths...\n"; -my %dstOutPaths = findOutputPaths \%dstNarFiles, \%dstSuccessors; +my %dstOutPaths = findOutputPaths \%dstNarFiles; sub getNameVersion { @@ -400,4 +397,4 @@ do { # Rewrite the manifest of the destination (with the new patches). writeManifest "$dstDir/MANIFEST", - \%dstNarFiles, \%dstPatches, \%dstSuccessors; + \%dstNarFiles, \%dstPatches; diff --git a/scripts/maintenance/gc-releases.pl b/scripts/maintenance/gc-releases.pl index 2bdd154a6539..80b2726c5a04 100755 --- a/scripts/maintenance/gc-releases.pl +++ b/scripts/maintenance/gc-releases.pl @@ -8,11 +8,10 @@ use readcache; # Read the manifests. my %narFiles; my %patches; -my %successors; foreach my $manifest (@ARGV) { print STDERR "loading $manifest\n"; - if (readManifest($manifest, \%narFiles, \%patches, \%successors, 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/maintenance/shrink-manifest.pl b/scripts/maintenance/shrink-manifest.pl index 9ceb4af90cde..7be581448807 100755 --- a/scripts/maintenance/shrink-manifest.pl +++ b/scripts/maintenance/shrink-manifest.pl @@ -7,11 +7,10 @@ use readcache; my %allNarFiles; my %allPatches; -my %allSuccessors; foreach my $manifest (glob "/data/webserver/dist/*/*/MANIFEST") { print STDERR "loading $manifest\n"; - readManifest($manifest, \%allNarFiles, \%allPatches, \%allSuccessors, 1); + readManifest($manifest, \%allNarFiles, \%allPatches, 1); } @@ -22,9 +21,8 @@ foreach my $manifest (@ARGV) { my %narFiles; my %patches; - my %successors; - if (readManifest($manifest, \%narFiles, \%patches, \%successors, 1) < 3) { + if (readManifest($manifest, \%narFiles, \%patches, 1) < 3) { print STDERR "manifest `$manifest' is too old (i.e., for Nix <= 0.7)\n"; next; } diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in index c1382b442917..21fa30c61e2f 100644 --- a/scripts/nix-pull.in +++ b/scripts/nix-pull.in @@ -29,7 +29,6 @@ umask 0022; # Process the URLs specified on the command line. my %narFiles; my %patches; -my %successors; my $skipWrongStore = 0; @@ -43,7 +42,7 @@ sub processURL { "'$url' > '$manifest'") == 0 or die "curl failed: $?"; - if (readManifest($manifest, \%narFiles, \%patches, \%successors) < 3) { + if (readManifest($manifest, \%narFiles, \%patches) < 3) { die "manifest `$url' is too old (i.e., for Nix <= 0.7)\n"; } diff --git a/scripts/readmanifest.pm.in b/scripts/readmanifest.pm.in index 28198eba4d1d..0e15133cf121 100644 --- a/scripts/readmanifest.pm.in +++ b/scripts/readmanifest.pm.in @@ -35,7 +35,6 @@ sub readManifest { my $manifest = shift; my $narFiles = shift; my $patches = shift; - my $successors = shift; my $allowConflicts = shift; $allowConflicts = 0 unless defined $allowConflicts; @@ -51,7 +50,6 @@ sub readManifest { my $url; my $hash; my $size; - my @preds; my $basePath; my $baseHash; my $patchType; @@ -75,7 +73,6 @@ sub readManifest { undef $url; undef $hash; undef $size; - @preds = (); undef $narHash; undef $basePath; undef $baseHash; @@ -117,10 +114,6 @@ sub readManifest { }; } - foreach my $p (@preds) { - $$successors{$p} = $storePath; - } - } elsif ($type eq "patch") { @@ -138,7 +131,7 @@ sub readManifest { elsif (/^\s*Hash:\s*(\S+)\s*$/) { $hash = $1; } elsif (/^\s*URL:\s*(\S+)\s*$/) { $url = $1; } elsif (/^\s*Size:\s*(\d+)\s*$/) { $size = $1; } - elsif (/^\s*SuccOf:\s*(\/\S+)\s*$/) { push @preds, $1; } + elsif (/^\s*SuccOf:\s*(\/\S+)\s*$/) { } # obsolete elsif (/^\s*BasePath:\s*(\/\S+)\s*$/) { $basePath = $1; } elsif (/^\s*BaseHash:\s*(\S+)\s*$/) { $baseHash = $1; } elsif (/^\s*Type:\s*(\S+)\s*$/) { $patchType = $1; } diff --git a/scripts/remove-patches.pl b/scripts/remove-patches.pl index 8329ab038a73..75eb0ce778a5 100755 --- a/scripts/remove-patches.pl +++ b/scripts/remove-patches.pl @@ -7,13 +7,12 @@ for my $p (@ARGV) { my %narFiles; my %patches; - my %successors; readManifest $p, - \%narFiles, \%patches, \%successors; + \%narFiles, \%patches; %patches = (); writeManifest $p, - \%narFiles, \%patches, \%successors; + \%narFiles, \%patches; } diff --git a/scripts/update-manifest.pl b/scripts/update-manifest.pl index bd76f37ad635..566f6467328d 100755 --- a/scripts/update-manifest.pl +++ b/scripts/update-manifest.pl @@ -9,9 +9,8 @@ my $cache = $ARGV[0]; my $manifest = $ARGV[1]; my %narFiles; my %patches; -my %successors; -readManifest $manifest, \%narFiles, \%patches, \%successors; +readManifest $manifest, \%narFiles, \%patches; foreach my $storePath (keys %narFiles) { my $narFileList = $narFiles{$storePath}; @@ -50,4 +49,4 @@ if (! -e "$manifest.backup") { system "mv --reply=no '$manifest' '$manifest.backup'"; } -writeManifest $manifest, \%narFiles, \%patches, \%successors; +writeManifest $manifest, \%narFiles, \%patches; |