unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrew Tropin <andrew@trop.in>
To: 60778@debbugs.gnu.org
Subject: [bug#60778] [PATCH] guix-install.sh: Source both profiles, default user's and home.
Date: Fri, 13 Jan 2023 14:09:02 +0400	[thread overview]
Message-ID: <87pmbi20qy.fsf@trop.in> (raw)

[-- Attachment #1: Type: text/plain, Size: 2004 bytes --]


* etc/guix-install.sh (sys_create_init_profile): Source both profiles, default
user's and home.
---
Sourced both profiles and both added to GUIX_LOCPATH if they exist.

return outside of the function AFAIK doesn't make sense, removed it.

In some future we could make a dummy locale-consumer package, which will make
$GUIX_PROFILE/etc/profile export GUIX_LOCPATH, so special treatment in this
script won't be needed anymore.

 etc/guix-install.sh | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 3ce9affc06..79f5be66b1 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -11,6 +11,7 @@
 # Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
 # Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 # Copyright © 2022 Prafulla Giri <prafulla.giri@protonmail.com>
+# Copyright © 2023 Andrew Tropin <andrew@trop.in>
 #
 # This file is part of GNU Guix.
 #
@@ -534,15 +535,19 @@ export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH"
 # searches 'Info-default-directory-list'.
 export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH"

-# GUIX_PROFILE: User's default profile
-# Prefer the one from 'guix home' if it exists.
+# GUIX_PROFILE: User's default profile and home profile
+GUIX_PROFILE="$HOME/.guix-profile"
+[ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
+[ -L $GUIX_PROFILE ] || \
+GUIX_LOCPATH="$GUIX_PROFILE/lib/locale:${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
+
 GUIX_PROFILE="$HOME/.guix-home/profile"
-[ -L $GUIX_PROFILE ] || GUIX_PROFILE="$HOME/.guix-profile"
-[ -L $GUIX_PROFILE ] || return
-GUIX_LOCPATH="$GUIX_PROFILE/lib/locale"
+[ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
+[ -L $GUIX_PROFILE ] || \
+GUIX_LOCPATH="$GUIX_PROFILE/lib/locale:${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
+
 export GUIX_LOCPATH

-[ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
 EOF
 }

-- 
2.38.1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

             reply	other threads:[~2023-01-13 10:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 10:09 Andrew Tropin [this message]
2023-04-07 15:24 ` [bug#60778] [PATCH] guix-install.sh: Source both profiles, default user's and home Ludovic Courtès
2023-04-09  7:07   ` bug#60778: " Andrew Tropin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmbi20qy.fsf@trop.in \
    --to=andrew@trop.in \
    --cc=60778@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).