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.
This commit is contained in:
parent
d90bd5642a
commit
2262ee2c63
1 changed files with 8 additions and 6 deletions
|
@ -793,12 +793,14 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
|
||||||
("mpfr" ,mpfr)
|
("mpfr" ,mpfr)
|
||||||
("mpc" ,mpc)
|
("mpc" ,mpc)
|
||||||
|
|
||||||
,@(match (and configuration-file
|
,@(match (let ((arch (platform-linux-architecture
|
||||||
(configuration-file
|
(lookup-platform-by-target-or-system
|
||||||
(platform-linux-architecture
|
(or (%current-target-system)
|
||||||
(lookup-platform-by-target-or-system
|
(%current-system))))))
|
||||||
(or (%current-target-system) (%current-system))))
|
(and configuration-file arch
|
||||||
#:variant (version-major+minor version)))
|
(configuration-file
|
||||||
|
arch
|
||||||
|
#:variant (version-major+minor version))))
|
||||||
(#f ;no config for this platform
|
(#f ;no config for this platform
|
||||||
'())
|
'())
|
||||||
((? string? config)
|
((? string? config)
|
||||||
|
|
Reference in a new issue