From 0552dcb294bbfed76d7a495f5e368c53f20b852a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 5 Jan 2022 19:29:50 +0100 Subject: shell: Cache profiles even when using package specs. This enables profile caching not just when '-m' or '-f' is used, but also when package specs are passed on the command line, as in: guix shell -D guix git It also changes profile cache keys to include the system type, which was previously ignored. * guix/scripts/shell.scm (options-with-caching)[single-file-for-caching]: Remove. Call 'profile-cached-gc-root' instead; adjust to accept two values. (profile-cache-primary-key): New procedure. (profile-cache-key): Remove. (profile-file-cache-key, profile-spec-cache-key): New procedures. (profile-cached-gc-root): Rewrite to include functionality formally in 'single-file-for-caching', but extend to handle package specs. * gnu/packages.scm (cache-is-authoritative?): Export. * guix/transformations.scm (transformation-option-key?): New procedure. * doc/guix.texi (Invoking guix shell): Move '--rebuild-cache' documentation to the bottom, just above '--root'. Explain caching and how these two options relate to that. --- gnu/packages.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages.scm b/gnu/packages.scm index ccfc83dd11..65ab7a7c1e 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2012-2020, 2022 Ludovic Courtès ;;; Copyright © 2013 Mark H Weaver ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2016, 2017 Alex Kost @@ -51,6 +51,7 @@ %auxiliary-files-path %package-module-path %default-package-module-path + cache-is-authoritative? fold-packages fold-available-packages -- cgit v1.2.3