guix/guix
Maxim Cournoyer 10e51d6dde
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>
2023-01-18 20:53:15 -05:00
..
build debug-link: Protect against dangling symlinks. 2023-01-17 16:05:20 +01:00
build-system build-system/meson: Add mips64el cross compilation support. 2023-01-17 10:50:58 +01:00
import import/cran: Fix Bioconductor updater. 2023-01-09 22:32:58 +01:00
platforms platforms: x86: Rename Hurd hurd to i586-gnu. 2022-09-24 14:49:07 +02:00
scripts scripts: repl: Add -i, --interactive flag. 2023-01-16 09:00:03 -05:00
store deduplicate: Use 'sendfile' only with file ports. 2022-12-10 18:13:39 +01:00
tests tests: git: Write files as UTF-8. 2022-08-09 15:58:14 +02:00
android-repo-download.scm
avahi.scm
base16.scm
base32.scm
base64.scm
build-system.scm
bzr-download.scm gnu: bazaar: Obsolete with breezy. 2022-05-31 14:54:02 -04:00
cache.scm cache: Catch invalid 'last-expiry-cleanup'. 2022-06-04 12:04:23 +02:00
channels.scm channels: Interpret the 'commit' field of channel as a tag or commit. 2022-10-17 09:37:27 +02:00
ci.scm ci: Add 'start-time' and 'stop-time' to <build> records. 2022-10-20 23:07:37 +02:00
colors.scm colors: Add 'colorize-full-matches'. 2022-04-19 18:07:49 +02:00
combinators.scm
config.scm.in
cpio.scm
cpu.scm guix: cpu: Add detection for aarch64 CPUs. 2022-05-17 15:19:41 +03:00
cve.scm
cvs-download.scm
d3.v3.js
deprecation.scm guix: Add define-deprecated/public-alias. 2022-04-12 20:32:32 +02:00
derivations.scm derivations: 'read-derivation' correctly handles case with empty hash. 2023-01-09 17:40:53 +01:00
describe.scm
diagnostics.scm diagnostics: Fix typo about 0-indexed COL in location. 2022-05-31 14:52:14 -04:00
discovery.scm
docker.scm
download.scm guix: Replace defective freemirror.org. 2022-11-13 01:00:07 +01:00
elf.scm
ftp-client.scm
gexp.scm Remove now unnecessary uses of (guix grafts). 2022-10-22 01:46:55 +02:00
git-authenticate.scm git-authenticate: Ensure the target is a descendant of the introductory commit. 2022-02-14 11:23:08 +01:00
git-download.scm git-download: Set locale to deal with Unicode in git metadata. 2022-04-20 23:46:43 +02:00
git.scm git: 'update-cached-checkout' returns the commit ID when given a tag. 2022-10-17 09:37:27 +02:00
glob.scm
gnu-maintenance.scm gnu-maintenance: 'gnu' and 'gnu-ftp' predicates catch networking errors. 2023-01-08 16:11:45 +01:00
gnupg.scm
grafts.scm grafts: Run with a UTF-8 locale. 2022-11-11 23:17:42 +01:00
graph.js
graph.scm graph: Factorize 'lookup-backend'. 2022-03-18 16:03:33 +01:00
hash.scm guix hash: Extract file hashing procedures. 2022-01-06 16:27:30 +01:00
hg-download.scm
http-client.scm http-client: 'http-fetch/cached' converts strings to URIs. 2022-05-22 01:07:52 +02:00
i18n.scm
inferior.scm inferior: Raise '&inferior-protocol-error' on invalid response. 2022-11-22 09:43:54 +01:00
ipfs.scm
least-authority.scm least-authority: Fix typo. 2022-06-10 23:52:34 -04:00
licenses.scm licenses: Add EUPL 1.1. 2022-11-26 09:07:29 +01:00
lint.scm Remove now unnecessary uses of (guix grafts). 2022-10-22 01:46:55 +02:00
man-db.scm guix: Index the man-db database via man pages names. 2022-03-02 00:00:55 -05:00
memoization.scm
modules.scm modules: Recognize #:declarative?. 2022-12-02 23:20:54 +01:00
monad-repl.scm monad-repl: Add "build", "lower", and "verbosity" commands. 2022-07-15 17:36:57 +02:00
monads.scm monads: Add 'mparameterize'. 2022-07-10 23:57:14 +02:00
nar.scm
narinfo.scm narinfo: Fix misleading docstring. 2022-09-24 17:59:04 +02:00
openpgp.scm
packages.scm guix: packages: Add type hint comment to home-page record field. 2022-12-19 15:26:41 +04:00
pki.scm pki: 'public-keys->acl' deduplicates entries. 2022-12-12 15:03:05 +01:00
platform.scm platforms: Raise an exception when no suitable platform is found. 2023-01-18 20:53:15 -05:00
profiles.scm profiles: info-dir-file: Remove install-info '--silent' option. 2022-10-27 23:34:45 -04:00
profiling.scm
progress.scm
quirks.scm
read-print.scm read-print: Do not use extended notation when printing '1+', '1-', etc. 2023-01-09 17:40:54 +01:00
records.scm records: match-record supports specifying a different variable name. 2022-12-27 23:53:42 +01:00
remote.scm
repl.scm
scripts.scm Remove now unnecessary uses of (guix grafts). 2022-10-22 01:46:55 +02:00
search-paths.scm search-paths: Tweak $SSL_CERT_DIR comment. 2022-09-08 16:22:21 +02:00
self.scm self: Mark the generation (guix config) as non-declarative. 2022-11-14 12:31:33 +01:00
serialization.scm
sets.scm
ssh.scm ssh: 'open-ssh-session' gracefully handles connection timeouts. 2022-08-10 16:53:58 +02:00
status.scm status: Relay "updating substitutes" messages. 2022-06-26 23:19:14 +02:00
store.scm grafts: Move '%graft?' and related bindings to (guix store). 2022-10-22 01:46:54 +02:00
substitutes.scm substitutes: Log the failing queries. 2023-01-07 14:27:17 +01:00
svn-download.scm svn-download: Add missing exports. 2022-10-17 23:15:08 +02:00
swh.scm
tests.scm tests: Set a hard build timeout. 2022-02-14 11:23:07 +01:00
transformations.scm transformations: Let users know when '--with-latest' has no effect. 2023-01-16 13:41:27 +01:00
ui.scm ui: It's 2023 now! 2023-01-03 12:25:48 +01:00
upstream.scm upstream: Allow downgrades. 2023-01-03 12:25:48 +01:00
utils.scm utils: Add target-mips64el?. 2022-08-05 00:14:30 +02:00
workers.scm