From f052c10eedf8701e746bbacac63a8ac0d4a8bc0f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 27 Feb 2009 09:53:58 +0000 Subject: [PATCH] * Check the manifest version. --- scripts/nix-pull.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in index b3644b800e..ac2e3e3ed0 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) {