mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
* Subtle bug: if you import File::stat in one module, it affects other
modules as well. So use symbolic field names everywhere (which is nicer anyway).
This commit is contained in:
parent
b1882c3ef7
commit
83252b4ca9
2 changed files with 7 additions and 5 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
use strict;
|
||||
use File::Temp qw(tempdir);
|
||||
use File::stat;
|
||||
use NixManifest;
|
||||
|
||||
my $hashAlgo = "sha256";
|
||||
|
@ -178,7 +179,7 @@ for (my $n = 0; $n < scalar @storePaths; $n++) {
|
|||
(-f $narFile) or die "narfile for $storePath not found";
|
||||
push @narArchives, $narFile;
|
||||
|
||||
my $narbz2Size = (stat $narFile)[7];
|
||||
my $narbz2Size = stat($narFile)->size;
|
||||
|
||||
my $references = `$binDir/nix-store --query --references '$storePath'`;
|
||||
die "cannot query references for `$storePath'" if $? != 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue