From f8e609c3413e38d403d986020079f24a2b82c063 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 16 Nov 2011 16:41:48 +0000 Subject: * 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). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- perl/lib/Nix/Manifest.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'perl') diff --git a/perl/lib/Nix/Manifest.pm b/perl/lib/Nix/Manifest.pm index 9c891abb8bd9..d1717a0a8ebd 100644 --- a/perl/lib/Nix/Manifest.pm +++ b/perl/lib/Nix/Manifest.pm @@ -305,8 +305,8 @@ EOF # unless we've already done so on a previous run. my %seen; - for my $manifest (glob "$manifestDir/*.nixmanifest") { - $manifest = Cwd::abs_path($manifest); + for my $manifestLink (glob "$manifestDir/*.nixmanifest") { + my $manifest = Cwd::abs_path($manifestLink); my $timestamp = lstat($manifest)->mtime; $seen{$manifest} = 1; @@ -342,10 +342,10 @@ EOF my $version = readManifest_($manifest, \&addNARToDB, \&addPatchToDB); if ($version < 3) { - die "you have an old-style manifest `$manifest'; please delete it"; + die "you have an old-style or corrupt manifest `$manifestLink'; please delete it"; } if ($version >= 10) { - die "manifest `$manifest' is too new; please delete it or upgrade Nix"; + die "manifest `$manifestLink' is too new; please delete it or upgrade Nix"; } } -- cgit 1.4.1