[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/05: gnu: linux-libre: Do not call 'configuration-file' on non-Linux t
From: |
guix-commits |
Subject: |
05/05: gnu: linux-libre: Do not call 'configuration-file' on non-Linux targets. |
Date: |
Thu, 26 May 2022 06:26:36 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 2262ee2c63fd92a17836ff7450623db76ed39d92
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu May 26 12:22:59 2022 +0200
gnu: linux-libre: Do not call 'configuration-file' on non-Linux targets.
Starting from commit b55310603f0df7d5ae02d47cb8d4be58bf1d41ca, 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.
---
gnu/packages/linux.scm | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index bd24fce432..18bd229dcf 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -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
- (lookup-platform-by-target-or-system
- (or (%current-target-system) (%current-system))))
- #:variant (version-major+minor version)))
+ ,@(match (let ((arch (platform-linux-architecture
+ (lookup-platform-by-target-or-system
+ (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)