shell: Ignore cached profiles when using '--export-manifest'.

Fixes <https://issues.guix.gnu.org/56539>.

Fixes a bug where "guix shell -D pkg --export-manifest" would provide
the expansion of PKG's dependencies instead of a call to
'package-development-manifest' if that profile happened to be cached.

* guix/scripts/shell.scm (profile-cached-gc-root): Add clause for 'export-manifest?.
This commit is contained in:
Ludovic Courtès 2022-07-15 12:45:32 +02:00
parent 4eb33b3706
commit 30915a7419
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

@ -390,6 +390,11 @@ return #f and #f."
;; If the user already specified a profile, there's nothing more to
;; cache.
(values #f #f))
((('export-manifest? . #t) . _)
;; When exporting a manifest, compute it anew so that '-D' packages
;; lead to 'package-development-manifest' expressions rather than an
;; expanded list of inputs.
(values #f #f))
((('system . system) . rest)
(loop rest system file specs))
((_ . rest) (loop rest system file specs)))))