mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-01 00:52:55 -05:00
environment: Really auto-load (guix scripts pack).
Fixes a performance regression on cache hits introduced in
b31ea797ed
, whereby (guix scripts pack)
would be loaded eagerly during startup, leading hundreds of (gnu
packages *) modules to be loaded.
Fixes <https://issues.guix.gnu.org/62899>.
* guix/scripts/environment.scm: Autoload (gnu build install).
(%options): Add indirection when calling 'symlink-spec-option-parser' so
that (guix scripts pack) is auto-loaded only when needed.
This commit is contained in:
parent
63500cbbee
commit
9fad6067d9
1 changed files with 6 additions and 2 deletions
|
@ -38,7 +38,7 @@ (define-module (guix scripts environment)
|
|||
#:autoload (guix scripts pack) (symlink-spec-option-parser)
|
||||
#:use-module (guix transformations)
|
||||
#:autoload (ice-9 ftw) (scandir)
|
||||
#:use-module (gnu build install)
|
||||
#:autoload (gnu build install) (evaluate-populate-directive)
|
||||
#:autoload (gnu build linux-container) (call-with-container %namespaces
|
||||
user-namespace-supported?
|
||||
unprivileged-user-namespace-supported?
|
||||
|
@ -271,7 +271,11 @@ (define %options
|
|||
(alist-cons 'file-system-mapping
|
||||
(specification->file-system-mapping arg #f)
|
||||
result)))
|
||||
(option '(#\S "symlink") #t #f symlink-spec-option-parser)
|
||||
(option '(#\S "symlink") #t #f
|
||||
(lambda (opt name arg result)
|
||||
;; Delay call to avoid auto-loading (guix scripts pack)
|
||||
;; when unnecessary.
|
||||
(symlink-spec-option-parser opt name arg result)))
|
||||
(option '(#\r "root") #t #f
|
||||
(lambda (opt name arg result)
|
||||
(alist-cons 'gc-root arg result)))
|
||||
|
|
Loading…
Reference in a new issue