GNU bug report logs - #60778
[PATCH] guix-install.sh: Source both profiles, default user's and home.

Previous Next

Package: guix-patches;

Reported by: Andrew Tropin <andrew <at> trop.in>

Date: Fri, 13 Jan 2023 10:23:02 UTC

Severity: normal

Tags: patch

Done: Andrew Tropin <andrew <at> trop.in>

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 60778 in the body.
You can then email your comments to 60778 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#60778; Package guix-patches. (Fri, 13 Jan 2023 10:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrew Tropin <andrew <at> trop.in>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 13 Jan 2023 10:23:02 GMT) Full text and rfc822 format available.

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

From: Andrew Tropin <andrew <at> trop.in>
To: guix-patches <at> gnu.org
Subject: [PATCH] guix-install.sh: Source both profiles, default user's and
 home.
Date: Fri, 13 Jan 2023 14:09:02 +0400
[Message part 1 (text/plain, inline)]
* 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 <at> gmail.com>
 # Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 # Copyright © 2022 Prafulla Giri <prafulla.giri <at> protonmail.com>
+# Copyright © 2023 Andrew Tropin <andrew <at> 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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#60778; Package guix-patches. (Fri, 07 Apr 2023 15:25:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Andrew Tropin <andrew <at> trop.in>
Cc: 60778 <at> debbugs.gnu.org
Subject: Re: bug#60778: [PATCH] guix-install.sh: Source both profiles,
 default user's and home.
Date: Fri, 07 Apr 2023 17:24:07 +0200
Hi,

Andrew Tropin <andrew <at> trop.in> skribis:

> * etc/guix-install.sh (sys_create_init_profile): Source both profiles, default
> user's and home.

[...]

> +[ -L $GUIX_PROFILE ] || \

[...]

> +[ -L $GUIX_PROFILE ] || \

This should be enclosed in double quotes.

Otherwise LGTM, thanks!

Ludo’.




Reply sent to Andrew Tropin <andrew <at> trop.in>:
You have taken responsibility. (Sun, 09 Apr 2023 07:09:01 GMT) Full text and rfc822 format available.

Notification sent to Andrew Tropin <andrew <at> trop.in>:
bug acknowledged by developer. (Sun, 09 Apr 2023 07:09:01 GMT) Full text and rfc822 format available.

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

From: Andrew Tropin <andrew <at> trop.in>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 60778-done <at> debbugs.gnu.org
Subject: Re: bug#60778: [PATCH] guix-install.sh: Source both profiles,
 default user's and home.
Date: Sun, 09 Apr 2023 11:07:41 +0400
[Message part 1 (text/plain, inline)]
On 2023-04-07 17:24, Ludovic Courtès wrote:

> Hi,
>
> Andrew Tropin <andrew <at> trop.in> skribis:
>
>> * etc/guix-install.sh (sys_create_init_profile): Source both profiles, default
>> user's and home.
>
> [...]
>
>> +[ -L $GUIX_PROFILE ] || \
>
> [...]
>
>> +[ -L $GUIX_PROFILE ] || \
>
> This should be enclosed in double quotes.
>
> Otherwise LGTM, thanks!
>
> Ludo’.

Thank you for the review, adjusted, applied and pushed as
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=02033bfc05

-- 
Best regards,
Andrew Tropin
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 07 May 2023 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 348 days ago.

Previous Next


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