diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2009-02-27T09·53+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2009-02-27T09·53+0000 |
commit | f052c10eedf8701e746bbacac63a8ac0d4a8bc0f (patch) | |
tree | bbf7b5bdd43d66c09a04484a75441ea7e8f155c5 | |
parent | a7cee528c5967ffe20e50fb9dc329987843d42ec (diff) |
* Check the manifest version.
-rw-r--r-- | scripts/nix-pull.in | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in index b3644b800e34..ac2e3e3ed027 100644 --- a/scripts/nix-pull.in +++ b/scripts/nix-pull.in @@ -68,10 +68,11 @@ sub processURL { print "obtaining list of Nix archives at `$url'...\n"; $manifest = downloadFile $url; } + + my $version = readManifest($manifest, \%narFiles, \%localPaths, \%patches); - if (readManifest($manifest, \%narFiles, \%localPaths, \%patches) < 3) { - die "`$url' is not manifest or it is too old (i.e., for Nix <= 0.7)\n"; - } + 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) { |