GNU bug report logs -
#45591
environment: gracefully handle unsupported system.
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#45591: environment: gracefully handle unsupported system.
which was filed against the guix-patches package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 45591 <at> debbugs.gnu.org.
--
45591: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45591
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hi,
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hi,
>
> guy fleury iteriteka <gfleury <at> disroot.org> skribis:
>
>> diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
>> index e435bf0..40af012 100644
>> --- a/guix/scripts/environment.scm
>> +++ b/guix/scripts/environment.scm
>> @@ -719,6 +719,10 @@ message if any test fails."
>> (mappings (pick-all opts 'file-system-mapping))
>> (white-list (pick-all opts 'inherit-regexp)))
>>
>> + (when (not (member system '("armhf-linux" "aarch64-linux"
>> + "i686-linux" "x86_64-linux" "i586-gnu")))
>> + (leave (G_ "guix does not support ~A system~%") system))
>
> The system list should not be hardcoded (there’s already such a list in
> (guix packages)).
>
> Currently the error one gets is:
>
> $ guix environment -s does-not-exist --ad-hoc coreutils
> guix environment: error: could not find bootstrap binary 'tar' for system 'does-not-exist'
>
> I suppose that’s what you intended to improve, right?
Thanks to the recent work of Mathieu, we now get:
guix environment: error: 'does-not-exist' is not a supported system
hint: Try `--list-systems' to view available system types.
Closing.
--
Thanks,
Maxim
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
hi guix,
if this patch looks good, feel free to change message diagnostic.
[0001-environment-gracefully-handle-unsupported-system.patch (text/x-diff, inline)]
From d9b4727885744abda8afc179182a2cc975122487 Mon Sep 17 00:00:00 2001
From: guy fleury iteriteka <gfleury <at> disroot.org>
Date: Fri, 1 Jan 2021 11:01:49 +0200
Subject: [PATCH] environment: gracefully handle unsupported system.
* guix/scripts/environment.scm(guix-environment): Add a test
to ensure that the system is supported.
---
guix/scripts/environment.scm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index e435bf0..40af012 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -719,6 +719,10 @@ message if any test fails."
(mappings (pick-all opts 'file-system-mapping))
(white-list (pick-all opts 'inherit-regexp)))
+ (when (not (member system '("armhf-linux" "aarch64-linux"
+ "i686-linux" "x86_64-linux" "i586-gnu")))
+ (leave (G_ "guix does not support ~A system~%") system))
+
(when container? (assert-container-features))
(when (and (not container?) link-prof?)
--
2.20.1
This bug report was last modified 2 years and 210 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.