Author: eelco
Date: Wed Nov 17 12:57:52 2010
New Revision: 24731
URL: https://svn.nixos.org/websvn/nix/?rev=24731&sc=1
Log:
* Store the NAR size in the manifest.
Modified:
nix/branches/sqlite/scripts/nix-push.in
nix/branches/sqlite/scripts/readmanifest.pm.in
Modified: nix/branches/sqlite/scripts/nix-push.in
==============================================================================
--- nix/branches/sqlite/scripts/nix-push.in Wed Nov 17 12:51:54 2010
(r24730)
+++ nix/branches/sqlite/scripts/nix-push.in Wed Nov 17 12:57:52 2010
(r24731)
@@ -193,6 +193,10 @@
die "cannot query hash for `$storePath'" if $? != 0;
chomp $narHash;
+ my $narSize = `$binDir/nix-store --query --size '$storePath'`;
+ die "cannot query size for `$storePath'" if $? != 0;
+ chomp $narSize;
+
my $url;
if ($localCopy) {
$url = "$targetArchivesUrl/$narName";
@@ -204,6 +208,7 @@
, hash => "$hashAlgo:$narbz2Hash"
, size => $narbz2Size
, narHash => "$narHash"
+ , narSize => $narSize
, references => $references
, deriver => $deriver
}
Modified: nix/branches/sqlite/scripts/readmanifest.pm.in
==============================================================================
--- nix/branches/sqlite/scripts/readmanifest.pm.in Wed Nov 17 12:51:54
2010 (r24730)
+++ nix/branches/sqlite/scripts/readmanifest.pm.in Wed Nov 17 12:57:52
2010 (r24731)
@@ -165,8 +165,9 @@
print MANIFEST " StorePath: $storePath\n";
print MANIFEST " NarURL: $narFile->{url}\n";
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 " NarHash: $narFile->{narHash}\n";
+ print MANIFEST " NarSize: $narFile->{narSize}\n" if
$narFile->{narSize};
print MANIFEST " References: $narFile->{references}\n"
if defined $narFile->{references} && $narFile->{references} ne
"";
print MANIFEST " Deriver: $narFile->{deriver}\n"
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits