diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-11-16 16:41:48 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-11-16 16:41:48 +0000 |
commit | f8e609c3413e38d403d986020079f24a2b82c063 (patch) | |
tree | 367c35fd0b29a6b2c9b6b5ea8f90ed96b99724b6 /scripts | |
parent | d7d7910ba48d898bda2db92a4f16a6179c855f7d (diff) |
* nix-pull: update the Nix manifest cache if necessary. Also, don't
read the manifest just to check the version and print the number of
paths. This makes nix-pull very fast for the cached cache (speeding
up nixos-rebuild without the ‘--no-pull’ or ‘--fast’ options).
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/nix-pull.in | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in index d8352b277..74545a350 100755 --- a/scripts/nix-pull.in +++ b/scripts/nix-pull.in @@ -33,10 +33,6 @@ if (! -l $manifestDirLink) { # Process the URLs specified on the command line. -my %narFiles; -my %patches; - -my $skipWrongStore = 0; sub downloadFile { my $url = shift; @@ -68,20 +64,6 @@ sub processURL { $manifest = downloadFile $url; } - 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; - - if ($skipWrongStore) { - foreach my $path (keys %narFiles) { - if (substr($path, 0, length($storeDir) + 1) ne "$storeDir/") { - print STDERR "warning: manifest `$url' assumes a Nix store at a different location than $storeDir, skipping...\n"; - exit 0; - } - } - } - my $baseName = "unnamed"; if ($url =~ /\/([^\/]+)\/[^\/]+$/) { # get the forelast component $baseName = $1; @@ -120,12 +102,12 @@ sub processURL { while (@ARGV) { my $url = shift @ARGV; if ($url eq "--skip-wrong-store") { - $skipWrongStore = 1; + # No-op, no longer supported. } else { processURL $url; } } -my $size = scalar (keys %narFiles); -print "$size store paths in manifest\n"; +# Update the cache. +updateManifestDB(); |