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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: guy fleury iteriteka <gfleury@HIDDEN>; dated Fri, 1 Jan 2021 11:01:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 45591 <at> debbugs.gnu.org:


Received: (at 45591) by debbugs.gnu.org; 13 Jan 2021 14:38:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 13 09:38:01 2021
Received: from localhost ([127.0.0.1]:34757 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kzhHd-0004xg-EG
	for submit <at> debbugs.gnu.org; Wed, 13 Jan 2021 09:38:01 -0500
Received: from eggs.gnu.org ([209.51.188.92]:34000)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kzhHc-0004xT-4V
 for 45591 <at> debbugs.gnu.org; Wed, 13 Jan 2021 09:38:00 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:57085)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1kzhHW-0000B7-Tw; Wed, 13 Jan 2021 09:37:54 -0500
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=39020 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1kzhHW-0005VO-Et; Wed, 13 Jan 2021 09:37:54 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: guy fleury iteriteka <gfleury@HIDDEN>
Subject: Re: bug#45591: environment: gracefully handle unsupported system.
References: <87v9chx71n.fsf@HIDDEN>
Date: Wed, 13 Jan 2021 15:37:53 +0100
In-Reply-To: <87v9chx71n.fsf@HIDDEN> (guy fleury iteriteka's message of
 "Fri, 01 Jan 2021 12:53:08 +0200")
Message-ID: <87lfcwaon2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 45591
Cc: 45591 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

guy fleury iteriteka <gfleury@HIDDEN> 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)))
>=20=20
> +      (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=E2=80=99s already such a lis=
t in
(guix packages)).

Currently the error one gets is:

  $ guix environment -s does-not-exist --ad-hoc coreutils=20
  guix environment: error: could not find bootstrap binary 'tar' for system=
 'does-not-exist'

I suppose that=E2=80=99s what you intended to improve, right?

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#45591; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 1 Jan 2021 11:00:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 01 06:00:13 2021
Received: from localhost ([127.0.0.1]:55451 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kvIAH-0006Ic-22
	for submit <at> debbugs.gnu.org; Fri, 01 Jan 2021 06:00:13 -0500
Received: from lists.gnu.org ([209.51.188.17]:48604)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gfleury@HIDDEN>) id 1kvIAE-0006IU-RD
 for submit <at> debbugs.gnu.org; Fri, 01 Jan 2021 06:00:11 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:45118)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gfleury@HIDDEN>)
 id 1kvIAE-0002zl-HY
 for guix-patches@HIDDEN; Fri, 01 Jan 2021 06:00:10 -0500
Received: from knopi.disroot.org ([178.21.23.139]:47334)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gfleury@HIDDEN>)
 id 1kvIAB-0005ZY-Uv
 for guix-patches@HIDDEN; Fri, 01 Jan 2021 06:00:10 -0500
Received: from localhost (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id EAEFE51C26
 for <guix-patches@HIDDEN>; Fri,  1 Jan 2021 11:53:13 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at disroot.org
Received: from knopi.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id yHDoaxAP3Mn1 for <guix-patches@HIDDEN>;
 Fri,  1 Jan 2021 11:53:12 +0100 (CET)
From: guy fleury iteriteka <gfleury@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1609498392; bh=BfiXotgUx1QwU9JZ8G9TMcjD/YmlZdWgkY/YmdYoXHg=;
 h=From:To:Subject:Date;
 b=ijGK5JsZa6awhOyGxKTY5+YRi5gwAbkWcnv+iXjKZug0DnmCE9ymirf4I/nWNcCjn
 R5oUGExa/AQwiQg/u0iD4dCmTYVApyjfOj4nVLcTgpNwbe4cNFd/jibbklgOMPyo4W
 uHlL/JXJkJ3V9BJA+SN4F2NR73xS2lJLKZXoazfL5/Sm7g8i/O2Bwrik1FGAxmb+cc
 EhTtTp0kFsDu9INQC//90VRdRd8VAgz8Q00h6xo0+wODlPpNqlJngWg8UBvytsxzqM
 vLWOzYieqzQFN0meEC8Wo8dERVUilLTuwzNmx1+LRFWr/ibQ7x4buYaCUpYvBAhIIh
 K7+t53aX5LzYQ==
To: guix-patches@HIDDEN
Subject: environment: gracefully handle unsupported system.
Date: Fri, 01 Jan 2021 12:53:08 +0200
Message-ID: <87v9chx71n.fsf@HIDDEN>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=178.21.23.139; envelope-from=gfleury@HIDDEN;
 helo=knopi.disroot.org
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

--=-=-=
Content-Type: text/plain

hi guix,

if this patch looks good, feel free to change message diagnostic.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-environment-gracefully-handle-unsupported-system.patch

From d9b4727885744abda8afc179182a2cc975122487 Mon Sep 17 00:00:00 2001
From: guy fleury iteriteka <gfleury@HIDDEN>
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


--=-=-=--




Acknowledgement sent to guy fleury iteriteka <gfleury@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#45591; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 13 Jan 2021 14:45:01 UTC

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