aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-07-02 00:37:49 +0200
committerLudovic Courtès <ludo@gnu.org>2017-07-02 00:41:12 +0200
commitb2fde4800d39863d9260509ac0b174b459d42840 (patch)
treed91b70dab106a024b0150d3ef918bb3fdaa2ef95
parent2633bd324b4333168518511030f227ee9664e65f (diff)
downloadguix-b2fde4800d39863d9260509ac0b174b459d42840.tar.gz
guix-b2fde4800d39863d9260509ac0b174b459d42840.zip
store: 'references/substitutes' really caches its result.
Until now the cache was always empty because 'for-each' was passed ITEMS as its second argument, and ITEMS was the empty list at that point. * guix/store.scm (references/substitutes): Add 'requested' variable. Use it as second argument of 'for-each' in base case.
-rw-r--r--guix/store.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/store.scm b/guix/store.scm
index afd26d3fec..a207d478e6 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -1009,7 +1009,8 @@ error if there is no such root."
length as ITEMS. Query substitute information for any item missing from the
store at once. Raise a '&nix-protocol-error' exception if reference
information for one of ITEMS is missing."
- (let* ((local-refs (map (lambda (item)
+ (let* ((requested items)
+ (local-refs (map (lambda (item)
(or (hash-ref %reference-cache item)
(guard (c ((nix-protocol-error? c) #f))
(references store item))))
@@ -1040,7 +1041,7 @@ the list of references")
(()
(let ((result (reverse result)))
(for-each (cut hash-set! %reference-cache <> <>)
- items result)
+ requested result)
result))
((item items ...)
(match local-refs
e='2018-10-25 21:21:26 +0800'>2018-10-25gnu: Add lxqt-powermanagement....Meiyo Peng 2018-10-25gnu: Add lxqt-openssh-askpass....Meiyo Peng 2018-10-25gnu: Add lxqt-policykit....Meiyo Peng 2018-10-25gnu: Add lxqt-notificationd....Meiyo Peng 2018-10-25gnu: lxqt.scm: Move qttools from inputs to native-inputs....Meiyo Peng 2018-10-25gnu: Add lxqt-config....Meiyo Peng 2018-10-24gnu: lxqt.scm: Add prefix to licenses imports....Meiyo Peng 2018-10-24gnu: Add lxqt-admin....Meiyo Peng 2018-10-24gnu: Add lxqt-about....Meiyo Peng 2018-10-24gnu: Add pcmanfm-qt....Meiyo Peng 2018-10-24gnu: Add libfm-qt....Meiyo Peng 2018-10-24gnu: Add lxqt-sudo....Meiyo Peng 2018-10-24gnu: Add lxqt-runner....Meiyo Peng 2018-10-24gnu: Add lxqt-panel....Meiyo Peng 2018-10-24gnu: Add libsysstat....Meiyo Peng 2018-10-24gnu: Add lxqt-globalkeys....Meiyo Peng 2018-10-23gnu: Add libstatgrab....Meiyo Peng 2018-10-23gnu: Add libdbusmenu-qt....Meiyo Peng 2018-10-23gnu: lxqt.scm: Sort packages alphabetically....Meiyo Peng 2018-10-23gnu: lxqt-build-tools: Update download URL and home page URL....Meiyo Peng 2018-10-23gnu: lxqt-session: Update to 0.13.0....Meiyo Peng 2018-10-22gnu: liblxqt: Update to 0.13.0....Meiyo Peng 2018-10-22gnu: libqtxdg: Update to 3.2.0....Meiyo Peng 2018-06-04gnu: lxqt-build-tools: Update to 0.5.0....Tobias Geerinckx-Rice 2018-03-20Correct name and Email for ng0....ng0 2017-10-22gnu: lxqt-common: Remove....Ludovic Courtès 2017-09-26gnu: Add lxqt-build-tools....ng0