From 0ca26437cb36822f9f74ee1a6dbc714477378b13 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 17 Feb 2022 16:23:42 +0100 Subject: guix build: Warn when attempting to build an unsupported package. Fixes . Reported by Maxim Cournoyer . * guix/scripts/build.scm (options->derivations)[warn-if-unsupported]: New procedure. [compute-derivation]: Use it. * tests/guix-build.sh: Add test. --- tests/guix-build.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 86e41e2927..9cbf8fe26d 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013, 2014, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès +# Copyright © 2012-2014, 2016-2022 Ludovic Courtès # Copyright © 2020 Marius Bakke # Copyright © 2021 Chris Marusich # @@ -31,6 +31,16 @@ guix build --version guix build -e '(@ (gnu packages bootstrap) %bootstrap-glibc)' -S test "`guix build -e '(@ (gnu packages bootstrap) %bootstrap-glibc)' -S`" = "" +# Warn when attempting to build an unsupported package. +case "$(guix build intelmetool -s armhf-linux -v0 -n 2>&1)" in + *warning:*intelmetool*support*armhf*) + true + break;; + *) + false; + break;; +esac + # Should pass. guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' | \ grep -e '-guile-' -- cgit 1.4.1