Make getDrvLogPath work with both bucketed and non-bucketed nix logs.

[?]
Feb 13, 2013, 12:09 PM
O776XDS2CAQ6CMDEWAXU5ZGBH4ETZB77CODANQM233BARYWBRIXQC

Dependencies

  • [2] ZH6B56XR Try harder to find build logs
  • [3] IN272KZW * Automatically keep all builds in the latest successful release in
  • [4] Y6AHH4TH Remove the logfile and logSize columns from the database
  • [*] 2GK5DOU7 * Downloading closures.

Change contents

  • replacement in src/lib/Hydra/Helper/Nix.pm at line 256
    [3.1103][3.1103:1312]()
    my $fn =
    ($ENV{NIX_LOG_DIR} || "/nix/var/log/nix") . "/drvs/"
    . substr($base, 0, 2) . "/"
    . substr($base, 2);
    return $fn if -f $fn;
    $fn .= ".bz2";
    return $fn if -f $fn;
    [3.1103]
    [2.1371]
    my $bucketed = substr($base, 0, 2) . "/" . substr($base, 2);
    my $fn = ($ENV{NIX_LOG_DIR} || "/nix/var/log/nix") . "/drvs/";
    for ($fn . $bucketed . ".bz2", $fn . $bucketed, $fn . $base . ".bz2", $fn . $base) {
    return $_ if (-f $_);
    }