aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-05-11 10:24:49 +0200
committerLudovic Courtès <ludo@gnu.org>2017-05-11 18:05:42 +0200
commit5db5dff53d255eb0738de4b44717a4b148fb8294 (patch)
treee7eacb25fec4bb8e0def96810010d1010f8b8abc
parent24b21720f7c3a368efc32017c126e107a5d76f52 (diff)
downloadguix-5db5dff53d255eb0738de4b44717a4b148fb8294.tar.gz
guix-5db5dff53d255eb0738de4b44717a4b148fb8294.zip
substitute: Honor 'Cache-Control' on 404 responses.
* guix/scripts/substitute.scm (cached-narinfo): When VALUE is #f, use the TTL that is read instead of %NARINFO-NEGATIVE-TTL. (cached-narinfo-expiration-time): Likewise.
-rwxr-xr-xguix/scripts/substitute.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 53162b3f9a..73d4f6e2eb 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -472,9 +472,9 @@ for PATH."
(match (read p)
(('narinfo ('version 2)
('cache-uri cache-uri)
- ('date date) ('ttl _) ('value #f))
+ ('date date) ('ttl ttl) ('value #f))
;; A cached negative lookup.
- (if (obsolete? date now %narinfo-negative-ttl)
+ (if (obsolete? date now ttl)
(values #f #f)
(values #t #f)))
(('narinfo ('version 2)
@@ -722,7 +722,7 @@ was found."
(match (read port)
(('narinfo ('version 2) ('cache-uri uri)
('date date) ('ttl ttl) ('value #f))
- (+ date %narinfo-negative-ttl))
+ (+ date ttl))
(('narinfo ('version 2) ('cache-uri uri)
('date date) ('ttl ttl) ('value value))
(+ date ttl))
8b64b8d11575563c3f867'>packages: 'fold-available-packages' uses 'supported-package?'.Ludovic Courtès Fixes <https://bugs.gnu.org/37748>. Reported by Marius Bakke <mbakke@fastmail.com>. This is a followup to d2d63e20d5b981009b61bf416b4d7b516e8f1f34. * gnu/packages.scm (fold-available-packages): Use 'supported-package?' instead of (member ... (package-supported-systems ...)) to match what 'generate-package-cache' does. 2019-09-06packages: 'generate-package-cache' uses 'supported-package?'.Ludovic Courtès * gnu/packages.scm (generate-package-cache): Use 'supported-package?' instead of 'package-supported-systems'. 2019-06-27Merge branch 'master' into core-updatesLudovic Courtès 2019-06-27packages: 'specification->package+output' distinguishes "no output specified".Ludovic Courtès Until now the caller couldn't tell the different between a spec like "foo:out" and one like "foo". This change allows users to distinguish between these two cases. * gnu/packages.scm (specification->package+output): Disable output membership test when OUTPUT = #f and SUB-DRV = #f. * tests/packages.scm ("specification->package+output") ("specification->package+output invalid output") ("specification->package+output no default output") ("specification->package+output invalid output, no default"): New tests. 2019-06-14packages: Remove 'search-bootstrap-binary'.Ludovic Courtès * gnu/packages.scm (%bootstrap-binaries-path, search-bootstrap-binary): Remove. * gnu/packages/bootstrap.scm (bootstrap-executable): Export. * guix/tests.scm (bootstrap-binary-file, search-bootstrap-binary): Export. * tests/derivations.scm: Remove (gnu packages) import. * tests/grafts.scm: Likewise. * tests/guix-daemon.sh: Likewise. 2019-05-01Merge branch 'master' into core-updatesMarius Bakke 2019-03-28packages: Reintroduce 'find-newest-available-packages'.Ludovic Courtès This is a followup to e2a903c807ccacec5925f197ce26f626060e1953. * gnu/packages.scm (find-newest-available-packages): New procedure. 2019-03-14Merge branch 'staging' into core-updatesMarius Bakke 2019-03-11packages: Add the channel .go files to the search path.Ludovic Courtès Until now %LOAD-COMPILED-PATH would wrongfully contain: CHANNEL/share/guile/site/X.Y for each channel, thereby ignoring all the .go files of channels. This fixes it so that %LOAD-COMPILED-PATH instead contains: CHANNEL/lib/guile/X.Y/site-ccache * guix/describe.scm (current-channel-entries): New procedure. (package-path-entries): Change to return the %LOAD-COMPILED-PATH entries as a second value. * gnu/packages.scm (%package-module-path): Expect two values from 'package-path-entries' and augment %LOAD-COMPILED-PATH accordingly. 2019-02-20Merge branch 'staging' into core-updatesMarius Bakke 2019-02-16packages: Remove duplicates from package cache.Ludovic Courtès Previously the same package could appear several times if several variables were bound to it, as is notably the case for "python" currently. This, in turn, would lead to obnoxious "ambiguous package specification" messages. * gnu/packages.scm (generate-package-cache)[expand-cache]: Change RESULT to RESULT+SEEN and adjust accordingly. Call 'first' on the result of 'fold-module-public-variables*'. * tests/packages.scm ("fold-available-packages with/without cache"): Check for lack of duplicates in FROM-CACHE. 2019-02-06Merge branch 'master' into core-updatesRicardo Wurmus