Make one-click installs work for binary cache stores

[?]
Oct 18, 2017, 12:09 PM
YVH5SVLS6EN7MBBJ4W4QXNTLTMBGP63RBINHZCMCPL6HJ3RIKZLAC

Dependencies

  • [2] CPSEZOSX Remove remaining references to store_mode etc.
  • [3] PMNWRTGJ Add multiple output support
  • [4] 5NO7NCKT * Refactoring.
  • [5] FPK5LF53 * Put the project-related actions in a separate controller. Put the
  • [6] NLYDMDAX .nixpkgs: Drop obsolete manifest URI
  • [7] XHVZXX6N
  • [8] LZVO64YG Merge in the first bits of the API work
  • [9] HXBXDEFK Speed up channel processing
  • [10] GJFYEU3S * Nix now stores logs by default as bzip2, make sure the build page uncompresses before showing.
  • [11] MNKXBLNC Return 410 Gone (rather than 500) if an output is no longer available
  • [12] UXVDOUBJ
  • [13] GIUGQKVR Fix .nixpkg channel uri
  • [14] ON4DDIBZ * Forgot to commit.
  • [15] BPVJBR2P * Only put Nix builds in the global channel.
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.

Change contents

  • replacement in src/lib/Hydra/Base/Controller/NixChannel.pm at line 6
    [3.1991][3.604:633](),[3.1060][3.604:633]()
    use List::MoreUtils qw(all);
    [3.1991]
    [3.302]
    use List::MoreUtils qw(any);
  • edit in src/lib/Hydra/Base/Controller/NixChannel.pm at line 92
    [3.1786][2.58:86]()
    requireLocalStore($c);
  • replacement in src/lib/Hydra/Base/Controller/NixChannel.pm at line 94
    [3.77][3.77:161]()
    unless all { isValidPath($_->path) } $c->stash->{build}->buildoutputs->all;
    [3.77]
    [3.246]
    if isLocalStore() && any { !isValidPath($_->path) } $c->stash->{build}->buildoutputs->all;
  • replacement in src/lib/Hydra/Controller/Build.pm at line 435
    [3.1671][3.3222:3383]()
    foreach my $out ($build->buildoutputs) {
    notFound($c, "Path " . $out->path . " is no longer available.")
    unless isValidPath($out->path);
    [3.1671]
    [3.3383]
    if (isLocalStore) {
    foreach my $out ($build->buildoutputs) {
    notFound($c, "Path " . $out->path . " is no longer available.")
    unless isValidPath($out->path);
    }
  • edit in src/lib/Hydra/View/NixPkg.pm at line 13
    [3.210][3.210:211](),[3.211][2.755:782]()
    requireLocalStore($c);
  • replacement in src/lib/Hydra/View/NixPkg.pm at line 14
    [2.783][2.783:822]()
    my $channelUri = $c->uri_for('/');
    [2.783]
    [3.335]
    my $channelUri = $c->config->{binary_cache_public_uri} // $c->uri_for('/');