mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
* 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).
This commit is contained in:
parent
d7d7910ba4
commit
f8e609c341
2 changed files with 7 additions and 25 deletions
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue