Message ID | 9e68ef3237150756a97d0e3eba94a6b08879eeca.1656899134.git.philip@philipmcgrath.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 0908627BBEA; Mon, 4 Jul 2022 03:36:20 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 B982327BBE9 for <patchwork@mira.cbaines.net>; Mon, 4 Jul 2022 03:36:19 +0100 (BST) Received: from localhost ([::1]:40086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org>) id 1o8Bwg-0008Bl-Sy for patchwork@mira.cbaines.net; Sun, 03 Jul 2022 22:36:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35046) 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 1o8BwQ-0007tU-NZ for guix-patches@gnu.org; Sun, 03 Jul 2022 22:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51853) 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 1o8BwQ-0004qK-FK for guix-patches@gnu.org; Sun, 03 Jul 2022 22:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1o8BwQ-0000ih-DS for guix-patches@gnu.org; Sun, 03 Jul 2022 22:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56050] [PATCH v2 2/2] etc/guix-install.sh: Check for profile from 'guix home'. Resent-From: Philip McGrath <philip@philipmcgrath.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 04 Jul 2022 02:36:02 +0000 Resent-Message-ID: <handler.56050.B56050.16569021552740@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56050@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org>, Philip McGrath <philip@philipmcgrath.com> Received: via spool by 56050-submit@debbugs.gnu.org id=B56050.16569021552740 (code B ref 56050); Mon, 04 Jul 2022 02:36:02 +0000 Received: (at 56050) by debbugs.gnu.org; 4 Jul 2022 02:35:55 +0000 Received: from localhost ([127.0.0.1]:45748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1o8BwI-0000i8-O7 for submit@debbugs.gnu.org; Sun, 03 Jul 2022 22:35:54 -0400 Received: from mail-qt1-f174.google.com ([209.85.160.174]:42685) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <philip@philipmcgrath.com>) id 1o8BwG-0000hD-BK for 56050@debbugs.gnu.org; Sun, 03 Jul 2022 22:35:52 -0400 Received: by mail-qt1-f174.google.com with SMTP id g14so8208448qto.9 for <56050@debbugs.gnu.org>; Sun, 03 Jul 2022 19:35:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kFdYf/ErQ/xtl0T3oGKVHl1DFMsHEaLWR9C9JbPPfIE=; b=bqmyt3CRc9d2yF635tVc1+HRXl2KHR/Hb+8ur1+ktBpTwHxPPYc7Obtv5o8olweUbm Dl9EoC7M3cNkSutt/jGkORQVAZs0Yvij2zvF0tIE5Tjg84aN3EdqFzGKrB3+gsbcqcXy VjoVeYMo64kcn+004v9Pp6GJJ3M5cvAIc6Sk4mCks/LKZA/z/iYCXpgwQLgYUcqf+Erz LrvfsGoTw7Th9+j1T2wMFXnZF+iHxhO9jklC6WIhYzHtKaH7mkNehvvLzR9Z2ptnGjcQ UhUgsrRXAELnIJv92EQ2Mx1oajVuAc16Wk/jWYXMJ8ki1CKSUUX+V0jkN6CW15psDLhj oFew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kFdYf/ErQ/xtl0T3oGKVHl1DFMsHEaLWR9C9JbPPfIE=; b=k7V64ThcQ4fH0JZvqX0IizT71nqbl71NNEE1d4Cr4KdlKq+kQ5tWC+kgpJzgUA/mbH t/jDbLorXhg1dJn0CAj8lLT6Z6j08zODRNs1a6EBGa1FAb37/Fz8MIOMxnAiPTykpKSv lxZ9jM8WEirQKYe/gYSJrpOGgEejm0KanEjzJI76DcuwuU6OKFKzClA4HnWN9FR3ahrR qQaajLof+x5CZnFs3NsOWKOMylbesooi0gZSDKEmDNfrT+twXeetHOFnQqNP0zw0TnF9 Dfooh/MWXwTnvszXRdq9SDCQyHH+6rMMV8D8Yiet/ytaNq/dzbvFcztKebUYlvo33lum q6Tg== X-Gm-Message-State: AJIora9cplWdXRkQM0uwqfuIm3XL+Qhd1FUAY0SnAA/OtcnlXGopy3U0 WMVwO5zP5FkPNpMHtRRgPsBbfcUQj1mVSauUnCU= X-Google-Smtp-Source: AGRyM1vDLXG4mCxfSr27uGlQff6I8oqen5OCiMg0+k5IxOPWHkHxZiYS1qi2b+OwdN5Dq7Bgia44eA== X-Received: by 2002:a05:6214:29ca:b0:472:fa99:100 with SMTP id gh10-20020a05621429ca00b00472fa990100mr822904qvb.87.1656902151939; Sun, 03 Jul 2022 19:35:51 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id c3-20020ac84e03000000b00304f55e56e4sm19302605qtw.40.2022.07.03.19.35.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Jul 2022 19:35:51 -0700 (PDT) From: Philip McGrath <philip@philipmcgrath.com> Date: Sun, 3 Jul 2022 22:35:03 -0400 Message-Id: <9e68ef3237150756a97d0e3eba94a6b08879eeca.1656899134.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <cover.1656899134.git.philip@philipmcgrath.com> References: <cover.1656899134.git.philip@philipmcgrath.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-getmail-retrieved-from-mailbox: Patches |
Series |
etc/guix-install.sh: Initialize XDG base directories.
|
|
Commit Message
Philip McGrath
July 4, 2022, 2:35 a.m. UTC
If "$HOME/.guix-home/profile" exists, use it for GUIX_PROFILE instead of "$HOME/.guix-profile". * etc/guix-install.sh (sys_create_init_profile): Check for 'guix home' profile. --- etc/guix-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Comments
Philip McGrath <philip@philipmcgrath.com> skribis: > If "$HOME/.guix-home/profile" exists, use it for GUIX_PROFILE instead of > "$HOME/.guix-profile". > > * etc/guix-install.sh (sys_create_init_profile): Check for 'guix home' > profile. [...] > +# Prefer the one from 'guix home' if it exists. > +GUIX_PROFILE="$HOME/.guix-home/profile" > +[ -L $GUIX_PROFILE ] || GUIX_PROFILE="$HOME/.guix-profile" Likewise, we should escape dollar signs. Ludo’.
On 2022-07-03 22:35, Philip McGrath wrote: > If "$HOME/.guix-home/profile" exists, use it for GUIX_PROFILE instead of > "$HOME/.guix-profile". > > * etc/guix-install.sh (sys_create_init_profile): Check for 'guix home' > profile. > --- > etc/guix-install.sh | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/etc/guix-install.sh b/etc/guix-install.sh > index 62a33a55c4..300681e111 100755 > --- a/etc/guix-install.sh > +++ b/etc/guix-install.sh > @@ -524,7 +524,9 @@ export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH" > export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH" > > # GUIX_PROFILE: User's default profile > -GUIX_PROFILE="$HOME/.guix-profile" > +# Prefer the one from 'guix home' if it exists. > +GUIX_PROFILE="$HOME/.guix-home/profile" > +[ -L $GUIX_PROFILE ] || GUIX_PROFILE="$HOME/.guix-profile" > [ -L $GUIX_PROFILE ] || return > GUIX_LOCPATH="$GUIX_PROFILE/lib/locale" > export GUIX_LOCPATH I think here we don't need to prefer one over another. Let's just repeat the process for both of them. If home profile exists source it, if user profile exists source it as well.
diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 62a33a55c4..300681e111 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -524,7 +524,9 @@ export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH" export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH" # GUIX_PROFILE: User's default profile -GUIX_PROFILE="$HOME/.guix-profile" +# Prefer the one from 'guix home' if it exists. +GUIX_PROFILE="$HOME/.guix-home/profile" +[ -L $GUIX_PROFILE ] || GUIX_PROFILE="$HOME/.guix-profile" [ -L $GUIX_PROFILE ] || return GUIX_LOCPATH="$GUIX_PROFILE/lib/locale" export GUIX_LOCPATH