about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2009-02-27T09·53+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2009-02-27T09·53+0000
commitf052c10eedf8701e746bbacac63a8ac0d4a8bc0f (patch)
treebbf7b5bdd43d66c09a04484a75441ea7e8f155c5 /scripts
parenta7cee528c5967ffe20e50fb9dc329987843d42ec (diff)
* Check the manifest version.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nix-pull.in7
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) {