* Add a NarSize field to Hydra manifests. This allows nix-env

to predict how much disk space a package will require.
* Compute the output / closure size using the info stored in the
  Nix database (rather than doing a slow "du").
This commit is contained in:
Eelco Dolstra
2010-11-19 15:44:20 +00:00
parent ba31684153
commit a93e272364
4 changed files with 17 additions and 24 deletions

View File

@ -9,7 +9,7 @@ use Hydra::Helper::CatalystUtils;
our @ISA = qw(Exporter);
our @EXPORT = qw(
isValidPath queryPathInfo
isValidPath
getHydraPath getHydraDBPath openHydraDB txn_do
registerRoot getGCRootsDir gcRootFor
getPrimaryBuildsForView
@ -23,17 +23,6 @@ sub isValidPath {
}
sub queryPathInfo {
my $path = shift;
my $hash = Nix::queryPathHash($path);
my $deriver = Nix::queryDeriver($path);
my @refs = Nix::queryReferences($path);
return ($hash, $deriver, \@refs);
}
sub getHydraPath {
my $dir = $ENV{"HYDRA_DATA"};
die "The HYDRA_DATA environment variable is not set!\n" unless defined $dir;