From 2ab4c7d597db0ce0c188f4c646055aa9575b486c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Jul 2012 23:14:45 +0200 Subject: [PATCH] Update queryPathInfo calls --- src/lib/Hydra/View/NARInfo.pm | 4 +--- src/lib/Hydra/View/NixManifest.pm | 2 +- src/script/hydra-build | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/lib/Hydra/View/NARInfo.pm b/src/lib/Hydra/View/NARInfo.pm index 64516365..fd363ebc 100644 --- a/src/lib/Hydra/View/NARInfo.pm +++ b/src/lib/Hydra/View/NARInfo.pm @@ -12,14 +12,12 @@ sub process { $c->response->content_type('text/x-nix-narinfo'); # !!! check MIME type - my ($deriver, $narHash, $time, $narSize, $refs) = queryPathInfo($storePath); + my ($deriver, $narHash, $time, $narSize, $refs) = queryPathInfo($storePath, 1); my $info; $info .= "StorePath: $storePath\n"; $info .= "URL: nar/" . basename $storePath. "\n"; $info .= "Compression: bzip2\n"; - #$info .= "FileHash: sha256:$compressedHash\n"; - #$info .= "FileSize: $compressedSize\n"; $info .= "NarHash: $narHash\n"; $info .= "NarSize: $narSize\n"; $info .= "References: " . join(" ", map { basename $_ } @{$refs}) . "\n"; diff --git a/src/lib/Hydra/View/NixManifest.pm b/src/lib/Hydra/View/NixManifest.pm index 466fd28d..6c2ac9d1 100644 --- a/src/lib/Hydra/View/NixManifest.pm +++ b/src/lib/Hydra/View/NixManifest.pm @@ -21,7 +21,7 @@ sub process { "}\n"; foreach my $path (@paths) { - my ($deriver, $hash, $time, $narSize, $refs) = queryPathInfo $path; + my ($deriver, $hash, $time, $narSize, $refs) = queryPathInfo($path, 0); # Escape the characters that are allowed to appear in a Nix # path name but have special meaning in a URI. diff --git a/src/script/hydra-build b/src/script/hydra-build index 6dcb60ae..d21c2d2a 100755 --- a/src/script/hydra-build +++ b/src/script/hydra-build @@ -385,12 +385,12 @@ sub doBuild { my $closuresize = 0; if (isValidPath($outPath)) { - my ($deriver, $hash, $time, $narSize, $refs) = queryPathInfo($outPath); + my ($deriver, $hash, $time, $narSize, $refs) = queryPathInfo($outPath, 0); $size = $narSize; my @closure = computeFSClosure(0, 0, $outPath); foreach my $path (@closure) { - my ($deriver, $hash, $time, $narSize, $refs) = queryPathInfo($path); + my ($deriver, $hash, $time, $narSize, $refs) = queryPathInfo($path, 0); $closuresize += $narSize; } }