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

[?]
Nov 19, 2010, 3:44 PM
6US6LEC7V7LUTMPXOWGU7D4PQAFOG2AKNW4VBPSENNBEDMTBJCVQC

Dependencies

  • [2] IGZ3IFSG * Escape `+', `=' and `?' in NAR URIS in manifests. Otherwise you get
  • [3] UC3YQDZF * Don't access /nix/var/nix/db directly but use the Nix Perl bindings.
  • [4] ZTQEU5QS Hydra: Add support for maxSilent meta attribute (also already added timeout, but not implemented the actual timeout for the build yet)
  • [5] 5O6E5SU5 hydra: store logfile/output path/closure size
  • [6] YT25ZGSZ
  • [7] 2IEFMER5 * Add --fallback to prevent problems with obsolete substitutes.
  • [8] DO432JDJ * Build Hydra with the Nix Perl bindings.
  • [9] UMOJJ6DV time out to 3600 for now
  • [10] SAFVRDTK * Put Hydra's dependencies so that they can easily be installed in a
  • [11] FHAVPTZ6 Hydra/23: added some X-headers with meta info in email notifications, added more descriptive status
  • [12] 7YBYT2LQ
  • [13] IN272KZW * Automatically keep all builds in the latest successful release in
  • [14] AFTXA575 * $HYDRA_DATA environment variable.
  • [15] BDSD2JLV * Speed up manifest generation.
  • [16] WZ3AEJ67 * hydra_update_gc_roots.pl registers build outputs that should be kept
  • [17] IWVA2P2Y * Generate manifests on demand. Next step: generate NAR archives on
  • [18] 2JQ7WEFM
  • [19] GZAXDYBQ * Script for initialising the database.
  • [20] BPVJBR2P * Only put Nix builds in the global channel.
  • [21] DV33AJ23
  • [22] LZO3C2KI * Hack around those SQLite timeouts: just retry the transaction.
  • [23] GAIBDEZZ * Store the name of the machine that performed a build step in the
  • [24] BD3GRK4B * Get rid of "positive failures" and separate log phases.
  • [25] CLJQCY2X * Store info about all the build actions and allow them to be
  • [26] 2GK5DOU7 * Downloading closures.
  • [27] CMU3YKOU * Store the release name.
  • [28] 37R34XJO * Negative caching: don't perform a build if a dependency already
  • [29] A63IHCMX * Register GC roots properly.
  • [30] OG7BEM57
  • [31] S3ZLZP3N * Cut off builds after half an hour of apparent inactivity. This
  • [*] NYC3LZKH * Generate NAR archives on the fly. Necessary for producing channels

Change contents

  • replacement in deps.nix at line 11
    [7.141][6.0:90]()
    rev = 24765;
    sha256 = "12ah8c8p9bx55hd17lhcfc74bd4r1677dxy0id3008pww1aklir7";
    [7.141]
    [7.231]
    rev = 24774;
    sha256 = "1akj695gpnbrjlnwd1gdnnnk7ppvpp1qsinjn04az7q6hjqzbm6p";
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 12
    [7.619][7.0:30]()
    isValidPath queryPathInfo
    [7.619]
    [7.536]
    isValidPath
  • edit in src/lib/Hydra/Helper/Nix.pm at line 26
    [7.79][7.79:121](),[7.230][7.230:231](),[7.231][3.47:177](),[3.177][7.336:337](),[7.336][7.336:337](),[7.683][7.683:721](),[7.374][7.298:302](),[7.721][7.298:302](),[7.298][7.298:302]()
    sub queryPathInfo {
    my $path = shift;
    my $hash = Nix::queryPathHash($path);
    my $deriver = Nix::queryDeriver($path);
    my @refs = Nix::queryReferences($path);
    return ($hash, $deriver, \@refs);
    }
  • replacement in src/lib/Hydra/View/NixManifest.pm at line 24
    [7.1011][7.747:806]()
    my ($hash, $deriver, $refs) = queryPathInfo $path;
    [7.1011]
    [2.0]
    my ($deriver, $hash, $time, $narSize, $refs) = Nix::queryPathInfo $path;
  • edit in src/lib/Hydra/View/NixManifest.pm at line 43
    [33.482]
    [7.1588]
    ($narSize != 0 ? " NarSize: $narSize\n" : "") .
  • edit in src/script/hydra_build.pl.in at line 202
    [7.871][5.1263:1366]()
    sub getSize {
    my $size = `du -bcs @_ 2> /dev/null | tail -1 | cut -f 1 `;
    return int($size);
    }
  • replacement in src/script/hydra_build.pl.in at line 232
    [7.5001][7.0:52]()
    my $cmd = "nix-store --realise $drvPath " .
    [7.5001]
    [4.1198]
    my $cmd = "nix-store -j1 --no-build-hook --realise $drvPath " .
  • replacement in src/script/hydra_build.pl.in at line 370
    [7.4021][5.1410:1532]()
    my $logsize = defined $logfile ? getSize($logfile) : 0;
    my $size = isValidPath($outPath) ? getSize($outPath) : 0;
    [7.4021]
    [5.1532]
    my $logsize = defined $logfile ? stat($logfile)->size : 0;
  • edit in src/script/hydra_build.pl.in at line 372
    [5.1533]
    [5.1533]
    my $size = 0;
  • edit in src/script/hydra_build.pl.in at line 374
    [5.1558]
    [5.1558]
  • replacement in src/script/hydra_build.pl.in at line 376
    [5.1591][5.1591:1703]()
    (my $hash, my $deriver, my $refs) = queryPathInfo($outPath) ;
    $closuresize = getSize(@{$refs});
    [5.1591]
    [5.1703]
    my ($deriver, $hash, $time, $narSize, $refs) = Nix::queryPathInfo($outPath);
    $size = $narSize;
    my @closure = Nix::computeFSClosure(0, 0, $outPath);
    foreach my $path (@closure) {
    my ($deriver, $hash, $time, $narSize, $refs) = Nix::queryPathInfo($path);
    $closuresize += $narSize;
    }