me
/
guix
Archived
1
0
Fork 0

gnu: linux-libre: Do not call 'configuration-file' on non-Linux targets.

Starting from commit b55310603f, a command
like:

  guix build linux-libre -s i586-gnu -n

would crash on a wrong-type-arg error in 'kernel-config' because it was
getting #f as the 'arch' argument.  This commit fixes it.

* gnu/packages/linux.scm (make-linux-libre*)[inputs]: Check whether
'platform-linux-architecture' returns #f, as is the case for example on
i586-gnu, before calling CONFIGURATION-FILE.
master
Ludovic Courtès 2022-05-26 12:22:59 +02:00
parent d90bd5642a
commit 2262ee2c63
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 8 additions and 6 deletions

View File

@ -793,12 +793,14 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
("mpfr" ,mpfr)
("mpc" ,mpc)
,@(match (and configuration-file
(configuration-file
(platform-linux-architecture
,@(match (let ((arch (platform-linux-architecture
(lookup-platform-by-target-or-system
(or (%current-target-system) (%current-system))))
#:variant (version-major+minor version)))
(or (%current-target-system)
(%current-system))))))
(and configuration-file arch
(configuration-file
arch
#:variant (version-major+minor version))))
(#f ;no config for this platform
'())
((? string? config)