summaryrefslogtreecommitdiff
path: root/tests/guix-package.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-02-17 16:06:39 +0100
committerLudovic Courtès <ludo@gnu.org>2022-02-18 14:14:38 +0100
commit5a57313918a5c1bd5cf8238c2dcae64a03523952 (patch)
tree3b3aaf86f1ec2bc06cc39548ee1d152e5fa27ebd /tests/guix-package.sh
parent0572737a6218d7390bac352011da47621e18d35b (diff)
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.
Diffstat (limited to 'tests/guix-package.sh')
-rw-r--r--tests/guix-package.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index 92ab565c5b0..d1b383d2adf 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -1,5 +1,5 @@
1# GNU Guix --- Functional package management for GNU 1# GNU Guix --- Functional package management for GNU
2# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> 2# Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org>
3# Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> 3# Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
4# 4#
5# This file is part of GNU Guix. 5# This file is part of GNU Guix.
@@ -59,6 +59,17 @@ test -L "$profile" && test -L "$profile-1-link"
59! test -f "$profile-2-link" 59! test -f "$profile-2-link"
60test -f "$profile/bin/guile" 60test -f "$profile/bin/guile"
61 61
62# Unsupported packages cannot be installed.
63! guix package -e '(begin (use-modules (guix) (gnu packages base)) (package (inherit sed) (supported-systems (list))))' -n
64case $(uname -m) in
65 x86_64|i[3456]86)
66 ! guix package -i novena-eeprom -n
67 break;;
68 *)
69 ! guix package -i intelmetool -n
70 break;;
71esac
72
62# Collisions are properly flagged (in this case, 'g-wrap' propagates 73# Collisions are properly flagged (in this case, 'g-wrap' propagates
63# guile@2.2, which conflicts with guile@2.0.) 74# guile@2.2, which conflicts with guile@2.0.)
64! guix package --bootstrap -n -p "$profile" -i g-wrap guile@2.0 75! guix package --bootstrap -n -p "$profile" -i g-wrap guile@2.0