1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

profiles: 'profile-derivation' rejects unsupported packages.

Previously user-facing commands would happily start building packages
even if they do not support that system.  With this change, all the
user-facing commands reject unsupported packages without going further.

* guix/profiles.scm (profile-derivation): Add #:allow-unsupported-packages?.
Define 'check-supported-packages' and honor #:allow-unsupported-packages?.
* tests/guix-pack.sh, tests/guix-package.sh, tests/guix-shell.sh: Ensure
that unsupported packages are rejected.
* tests/guix-system.sh: Pass "--system=armhf-linux" when attempting to
build gnu/system/examples/asus-c201.tmpl.
This commit is contained in:
Ludovic Courtès
2022-02-17 16:06:39 +01:00
parent 0572737a62
commit 5a57313918
5 changed files with 48 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
#
# This file is part of GNU Guix.
@@ -59,6 +59,17 @@ test -L "$profile" && test -L "$profile-1-link"
! test -f "$profile-2-link"
test -f "$profile/bin/guile"
# Unsupported packages cannot be installed.
! guix package -e '(begin (use-modules (guix) (gnu packages base)) (package (inherit sed) (supported-systems (list))))' -n
case $(uname -m) in
x86_64|i[3456]86)
! guix package -i novena-eeprom -n
break;;
*)
! guix package -i intelmetool -n
break;;
esac
# Collisions are properly flagged (in this case, 'g-wrap' propagates
# guile@2.2, which conflicts with guile@2.0.)
! guix package --bootstrap -n -p "$profile" -i g-wrap guile@2.0