forked from lix-project/lix
* Store the NAR size in the manifest.
This commit is contained in:
parent
5693b8a7e2
commit
06699d4219
|
@ -193,6 +193,10 @@ for (my $n = 0; $n < scalar @storePaths; $n++) {
|
||||||
die "cannot query hash for `$storePath'" if $? != 0;
|
die "cannot query hash for `$storePath'" if $? != 0;
|
||||||
chomp $narHash;
|
chomp $narHash;
|
||||||
|
|
||||||
|
my $narSize = `$binDir/nix-store --query --size '$storePath'`;
|
||||||
|
die "cannot query size for `$storePath'" if $? != 0;
|
||||||
|
chomp $narSize;
|
||||||
|
|
||||||
my $url;
|
my $url;
|
||||||
if ($localCopy) {
|
if ($localCopy) {
|
||||||
$url = "$targetArchivesUrl/$narName";
|
$url = "$targetArchivesUrl/$narName";
|
||||||
|
@ -204,6 +208,7 @@ for (my $n = 0; $n < scalar @storePaths; $n++) {
|
||||||
, hash => "$hashAlgo:$narbz2Hash"
|
, hash => "$hashAlgo:$narbz2Hash"
|
||||||
, size => $narbz2Size
|
, size => $narbz2Size
|
||||||
, narHash => "$narHash"
|
, narHash => "$narHash"
|
||||||
|
, narSize => $narSize
|
||||||
, references => $references
|
, references => $references
|
||||||
, deriver => $deriver
|
, deriver => $deriver
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,8 +165,9 @@ sub writeManifest {
|
||||||
print MANIFEST " StorePath: $storePath\n";
|
print MANIFEST " StorePath: $storePath\n";
|
||||||
print MANIFEST " NarURL: $narFile->{url}\n";
|
print MANIFEST " NarURL: $narFile->{url}\n";
|
||||||
print MANIFEST " Hash: $narFile->{hash}\n" if defined $narFile->{hash};
|
print MANIFEST " Hash: $narFile->{hash}\n" if defined $narFile->{hash};
|
||||||
print MANIFEST " NarHash: $narFile->{narHash}\n";
|
|
||||||
print MANIFEST " Size: $narFile->{size}\n" if defined $narFile->{size};
|
print MANIFEST " Size: $narFile->{size}\n" if defined $narFile->{size};
|
||||||
|
print MANIFEST " NarHash: $narFile->{narHash}\n";
|
||||||
|
print MANIFEST " NarSize: $narFile->{narSize}\n" if $narFile->{narSize};
|
||||||
print MANIFEST " References: $narFile->{references}\n"
|
print MANIFEST " References: $narFile->{references}\n"
|
||||||
if defined $narFile->{references} && $narFile->{references} ne "";
|
if defined $narFile->{references} && $narFile->{references} ne "";
|
||||||
print MANIFEST " Deriver: $narFile->{deriver}\n"
|
print MANIFEST " Deriver: $narFile->{deriver}\n"
|
||||||
|
|
Loading…
Reference in a new issue