diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-01-13 17:27:38 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-01-18 20:53:15 -0500 |
commit | 10e51d6dde2293ed5f5bf95d505c0b89c5db8f89 (patch) | |
tree | 167e54bcdaa97c22f7b90e2f31a69d95fb65dd9e /gnu/home.scm | |
parent | 0d200206ca14b2c13c79e5aa231e58addec53681 (diff) | |
download | guix-10e51d6dde2293ed5f5bf95d505c0b89c5db8f89.tar.gz guix-10e51d6dde2293ed5f5bf95d505c0b89c5db8f89.zip |
platforms: Raise an exception when no suitable platform is found.
This was motivated by #60786, which produced a cryptic, hard to understand
backtrace.
Given the following reproducer:
(use-modules (guix packages)
(gnu packages cross-base))
(define linux-libre-headers-cross-mips64el-linux-gnuabi64
(cross-kernel-headers "mips64el-linux-gnuabi64"))
(package-arguments linux-libre-headers-cross-mips64el-linux-gnuabi64)
Before this change:
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f
After this change:
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
ERROR:
1. &platform-not-found-error: "mips64el-linux-gnuabi64"
* guix/platform.scm (&platform-not-found-error): New condition.
(platform-not-found-error?): New predicate.
(false-if-platform-not-found): New syntax.
(lookup-platform-by-system): Raise an exception when no platform is found.
Update documentation.
(lookup-platform-by-target): Likewise.
(lookup-platform-by-target-or-system): Likewise, and guard lookup calls with
false-if-platform-not-found.
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Handle
lookup-platform-by-system call to preserve existing behavior.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu/home.scm')
0 files changed, 0 insertions, 0 deletions