GNU bug report logs - #45591
environment: gracefully handle unsupported system.

Previous Next

Package: guix-patches;

Reported by: guy fleury iteriteka <gfleury <at> disroot.org>

Date: Fri, 1 Jan 2021 11:01:02 UTC

Severity: normal

Tags: moreinfo

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45591 in the body.
You can then email your comments to 45591 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#45591; Package guix-patches. (Fri, 01 Jan 2021 11:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to guy fleury iteriteka <gfleury <at> disroot.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 01 Jan 2021 11:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: guy fleury iteriteka <gfleury <at> disroot.org>
To: guix-patches <at> gnu.org
Subject: environment: gracefully handle unsupported system.
Date: Fri, 01 Jan 2021 12:53:08 +0200
[Message part 1 (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


Information forwarded to guix-patches <at> gnu.org:
bug#45591; Package guix-patches. (Wed, 13 Jan 2021 14:39:02 GMT) Full text and rfc822 format available.

Message #8 received at 45591 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: guy fleury iteriteka <gfleury <at> disroot.org>
Cc: 45591 <at> debbugs.gnu.org
Subject: Re: bug#45591: environment: gracefully handle unsupported system.
Date: Wed, 13 Jan 2021 15:37:53 +0100
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?

Ludo’.




Added tag(s) moreinfo. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 22 Mar 2021 17:23:02 GMT) Full text and rfc822 format available.

Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Mon, 16 Jan 2023 18:11:01 GMT) Full text and rfc822 format available.

Notification sent to guy fleury iteriteka <gfleury <at> disroot.org>:
bug acknowledged by developer. (Mon, 16 Jan 2023 18:11:02 GMT) Full text and rfc822 format available.

Message #15 received at 45591-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 45591-done <at> debbugs.gnu.org, guy fleury iteriteka <gfleury <at> disroot.org>
Subject: Re: bug#45591: environment: gracefully handle unsupported system.
Date: Mon, 16 Jan 2023 13:10:24 -0500
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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 14 Feb 2023 12:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 143 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.