diff mbox series

[bug#64763] gnu: commencement: Use system in %final-inputs.

Message ID 3e0a5d1957c35a9925aab5600ee02b923584a599.1689934305.git.mail@cbaines.net
State New
Headers show
Series [bug#64763] gnu: commencement: Use system in %final-inputs. | expand

Commit Message

Christopher Baines July 21, 2023, 10:11 a.m. UTC
Otherwise this causes odd issues, I presume arising from when %current-system
differs from the system argument passed to %final-inputs.

* gnu/packages/commencement.scm (%final-inputs): Set %current-system to
system.
---
 gnu/packages/commencement.scm | 51 ++++++++++++++++++-----------------
 1 file changed, 26 insertions(+), 25 deletions(-)


base-commit: 120f1721b2b66e5c9507556267bbfd83945958ce
prerequisite-patch-id: 9576d8ce545492d52fbe016d30103a51a9ddf94f

Comments

Ludovic Courtès Aug. 7, 2023, 3:02 p.m. UTC | #1
Hi!

Christopher Baines <mail@cbaines.net> skribis:

> Otherwise this causes odd issues, I presume arising from when %current-system
> differs from the system argument passed to %final-inputs.
>
> * gnu/packages/commencement.scm (%final-inputs): Set %current-system to
> system.

Please add a “Fixes …” line in the log.

>  gnu/packages/commencement.scm | 51 ++++++++++++++++++-----------------
>  1 file changed, 26 insertions(+), 25 deletions(-)
>
> diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
> index fe6f025257..e522e70444 100644
> --- a/gnu/packages/commencement.scm
> +++ b/gnu/packages/commencement.scm
> @@ -3459,31 +3459,32 @@ (define-public %final-inputs

[...]

> +    (parameterize ((%current-system system))

LGTM!  I think that was definitely the intent of
0dd293b4d9095137c9952e16ca951f887b7e7018 (Cc’ing Josselin just in
case).

Thanks,
Ludo’.

PS: I believe the reason we cannot just write:

      (define/system-dependent %final-inputs …)

    is because we have two places where we do:

      (module-ref m '%final-inputs)

    which wouldn’t work if ‘%final-inputs’ were a macro, as is the case
    with ‘define/system-dependent’.
diff mbox series

Patch

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index fe6f025257..e522e70444 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3459,31 +3459,32 @@  (define-public %final-inputs
     ;; still use 'package-with-bootstrap-guile' so that the bootstrap tools are
     ;; used for origins that have patches, thereby avoiding circular
     ;; dependencies.
-    (let ((finalize (compose with-boot6
-                             package-with-bootstrap-guile)))
-      `(,@(map (match-lambda
-                 ((name package)
-                  (list name (finalize package))))
-               `(("tar" ,tar)
-                 ("gzip" ,gzip)
-                 ("bzip2" ,bzip2)
-                 ("file" ,file)
-                 ("diffutils" ,diffutils)
-                 ("patch" ,patch)
-                 ("findutils" ,findutils)
-                 ("gawk" ,gawk)))
-        ("sed" ,sed-final)
-        ("grep" ,grep-final)
-        ("xz" ,xz-final)
-        ("coreutils" ,coreutils-final)
-        ("make" ,gnu-make-final)
-        ("bash" ,bash-final)
-        ("ld-wrapper" ,ld-wrapper)
-        ("binutils" ,binutils-final)
-        ("gcc" ,gcc-final)
-        ("libc" ,glibc-final)
-        ("libc:static" ,glibc-final "static")
-        ("locales" ,glibc-utf8-locales-final)))))
+    (parameterize ((%current-system system))
+      (let ((finalize (compose with-boot6
+                               package-with-bootstrap-guile)))
+        `(,@(map (match-lambda
+                   ((name package)
+                    (list name (finalize package))))
+                 `(("tar" ,tar)
+                   ("gzip" ,gzip)
+                   ("bzip2" ,bzip2)
+                   ("file" ,file)
+                   ("diffutils" ,diffutils)
+                   ("patch" ,patch)
+                   ("findutils" ,findutils)
+                   ("gawk" ,gawk)))
+          ("sed" ,sed-final)
+          ("grep" ,grep-final)
+          ("xz" ,xz-final)
+          ("coreutils" ,coreutils-final)
+          ("make" ,gnu-make-final)
+          ("bash" ,bash-final)
+          ("ld-wrapper" ,ld-wrapper)
+          ("binutils" ,binutils-final)
+          ("gcc" ,gcc-final)
+          ("libc" ,glibc-final)
+          ("libc:static" ,glibc-final "static")
+          ("locales" ,glibc-utf8-locales-final))))))
 
 (define-public canonical-package
   (let ((name->package (mlambda (system)