Message ID | 20250417213637.2085198-1-nomike@nomike.com |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0438F27BC4A; Thu, 17 Apr 2025 22:38:41 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B056B27BC49 for <patchwork@mira.cbaines.net>; Thu, 17 Apr 2025 22:38:37 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1u5Wvv-0004Lu-EM; Thu, 17 Apr 2025 17:38:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1u5Wvs-0004GG-EP for guix-patches@gnu.org; Thu, 17 Apr 2025 17:38:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1u5Wvs-0001lw-4o for guix-patches@gnu.org; Thu, 17 Apr 2025 17:38:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=oNDjdSjJFWNjwVbEpkOBqcz14Q3dmLBKr4Ea7yfMdQE=; b=mZmvc7H+UtWtD621275GnMr9TNu9kIP/kHB2l0FomeT2Sx43hLcNqNfAFnbZnWxoxSG6Dk0ZEO54lEJxMucaT/P0KFy17Bw6ATr+M8FBQ6uhxPZzQgDvw0vbJO1dsyDlHWFN+5KBXgpk56GhjmKlF52HeKolQAKCYd9XZeMIdSYsMCn3j9mayysiRZ1jhJNtSyGuFPEKdjHS/QBvHwkW+CRiqnftOiOEjG29lAb75rEvJdqCFLY8EmCfwPMh9IvEvZ55XLZiKmm0PiwmU6NthRMDsj6XvQJTwfg3u14i/jaijmCGpUIA4wp8zzDO60Gi3z4UEkQ11c6fDfgXtduwHw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1u5Wvr-0003el-NU for guix-patches@gnu.org; Thu, 17 Apr 2025 17:38:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77878] [PATCH] pre-inst-env: Issue a warning if nor run within a guix shell. Resent-From: nomike <nomike@nomike.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 17 Apr 2025 21:38:03 +0000 Resent-Message-ID: <handler.77878.B.174492583313522@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77878@debbugs.gnu.org Cc: nomike <nomike@nomike.com> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174492583313522 (code B ref -1); Thu, 17 Apr 2025 21:38:03 +0000 Received: (at submit) by debbugs.gnu.org; 17 Apr 2025 21:37:13 +0000 Received: from localhost ([127.0.0.1]:48730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1u5Wv0-0003Vo-Ru for submit@debbugs.gnu.org; Thu, 17 Apr 2025 17:37:12 -0400 Received: from lists.gnu.org ([2001:470:142::17]:53932) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <nomike@nomike.com>) id 1u5Wuu-0003TZ-Hf for submit@debbugs.gnu.org; Thu, 17 Apr 2025 17:37:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <nomike@nomike.com>) id 1u5Wul-0003sq-H5 for guix-patches@gnu.org; Thu, 17 Apr 2025 17:36:57 -0400 Received: from fly.ash.relay.mailchannels.net ([23.83.222.61]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <nomike@nomike.com>) id 1u5Wuj-0001bV-5o for guix-patches@gnu.org; Thu, 17 Apr 2025 17:36:55 -0400 X-Sender-Id: dreamhost|x-authsender|nomike@nomike.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A00948A4048; Thu, 17 Apr 2025 21:36:49 +0000 (UTC) Received: from pdx1-sub0-mail-a254.dreamhost.com (trex-2.trex.outbound.svc.cluster.local [100.109.34.158]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 15EB98A35E7; Thu, 17 Apr 2025 21:36:49 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1744925809; a=rsa-sha256; cv=none; b=SumZdTGWz/7csY0MB24inGk1NaQJJijeiwUyet7znkJRvKDqxix7iLFJALKXYjbvE8yh5O +qsTjpmIog8eZXEMM+XEaZWH6xF+dD7XrwwjmlXUJNbwlZtiVGIR+IvAfbvr6yAny6jtgV nbfnJrg3252Aw5Y90rnuBbkfEqyCwxjTvI6wogXqZ2aLq5H4z6ElGZupgaXGusuh6rBqcg hss+WoBGkcB/lZz9Igs4kmBIQeK01ZiQ29R5dxGHc7h0r5vWYAAYu16Jpxj9Ju86WlCIZ6 n0SxmJHEXLxz48P/73xXHhua/m2S6CrSyi9ELE9zGaRj+770n8Svroy2bd6B0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1744925809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=oNDjdSjJFWNjwVbEpkOBqcz14Q3dmLBKr4Ea7yfMdQE=; b=ietvJnka1/9vysv2ipaolYN7A553CsBBGc4/DjMnRtavhPsMekO8JKmMSsBLbGoX6/Hs3V LYjDmXG9gS9piUB5BFsm8dPECN9Q3gPF3ig7QEYrlIxzdFRNk+My2CnpXb6x5a5/0b4mR2 N0NC9LWop8FfBIZf4oi3O+iV/sKSiM9p3bdwmMHnV9ABswO8PN5D/b8R/isLS0fUJ5ZoBQ UUMx6iHB6j9aPkbyWagnPvjHDi7aM9Vbqhd/RCK11/r21ie+gjEWYT8SzU1NfBk6+rMqYZ Yx2MNKCKQTbR/5DyRlwGuvuQdBBNizBwEa0fYXc+9CTSl3eUlr9rNoGZlEUj0Q== ARC-Authentication-Results: i=1; rspamd-7bd9ff6c58-hcmmp; auth=pass smtp.auth=dreamhost smtp.mailfrom=nomike@nomike.com X-Sender-Id: dreamhost|x-authsender|nomike@nomike.com X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|nomike@nomike.com X-MailChannels-Auth-Id: dreamhost X-Dime-Eight: 62be421b2a64dfd1_1744925809505_1773763156 X-MC-Loop-Signature: 1744925809505:2303266351 X-MC-Ingress-Time: 1744925809505 Received: from pdx1-sub0-mail-a254.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.109.34.158 (trex/7.0.3); Thu, 17 Apr 2025 21:36:49 +0000 Received: from localhost (84-112-221-106.cable.dynamic.surfer.at [84.112.221.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nomike@nomike.com) by pdx1-sub0-mail-a254.dreamhost.com (Postfix) with ESMTPSA id 4ZdrnX4FXpz6F; Thu, 17 Apr 2025 14:36:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nomike.com; s=dreamhost; t=1744925808; bh=oNDjdSjJFWNjwVbEpkOBqcz14Q3dmLBKr4Ea7yfMdQE=; h=From:To:Cc:Subject:Date:Content-Transfer-Encoding; b=UGjGWD+jgjfgvaScXz96J/bqylE6ERmNffxP8PF1dz1iDvmoWUYCZXSRt0bhriaWR OGbzCM5aJK2QTaxeWTcOd446VvaULYWwW4L2ObiBVUiZCxrlBrxKAsgZBFnRzKLh2i IKafYepElqNXRVbpr5S0QnQjtxEG+qo4+zDh0GzntFZcrJj7A5PIOH9fUawTtb+aQR 6ekWfA3/MSTYuRNG/uzRzLMYDYDrFpr2U6Mw+q0PeKMMJiO2/v6a23hLsDaU001nRX z/6jEIV/I083DUyjYwJD4w/Hto903Ey6x0sGEPLFS0JpZVWNk4v50tUzld70K3ott3 4jnq5r2rRyy+Q== From: nomike <nomike@nomike.com> Date: Thu, 17 Apr 2025 23:36:29 +0200 Message-ID: <20250417213637.2085198-1-nomike@nomike.com> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=23.83.222.61; envelope-from=nomike@nomike.com; helo=fly.ash.relay.mailchannels.net 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
[bug#77878] pre-inst-env: Issue a warning if nor run within a guix shell.
|
|
Commit Message
nomike
April 17, 2025, 9:36 p.m. UTC
Change-Id: I9f212b3c665b7d8ac653c44eeafe6fc41da5b8ff --- When running ./pre-inst-env on a foreign distro not within a guix shell, weird things happen. ```plaintext $ ./pre-inst-env guix lint nano guix: lint: command not found hint: Did you mean `lint'? Try `guix --help' for more information. ``` This patch changes pre-inst-env to issue a warning in that case, which could be especially helpful for newbies. Perhaps a pointer to the right place in the documentation would be helpful here as well. build-aux/pre-inst-env.in | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/build-aux/pre-inst-env.in b/build-aux/pre-inst-env.in index cd90a06cbc..6081d7aaa5 100644 --- a/build-aux/pre-inst-env.in +++ b/build-aux/pre-inst-env.in @@ -24,6 +24,11 @@ # Run COMMAND in a pre-installation environment. Typical use is # "./pre-inst-env guix build hello". +# Check whether we currently are in a guix shell and issue a warning if we're not +if [ -z "$GUIX_ENVIRONMENT" ]; then + echo "\e[1mWarning:\e[0m you are not in a guix shell. This may lead to unexpected results." >&2 +fi + # By default we may end up with absolute directory names that contain '..', # which get into $GUILE_LOAD_PATH, leading to '..' in the module file names # recorded by Guile. To avoid that, make sure we get a real absolute