Duplicate folders in docs

  • Done
  • quality assurance status badge
Details
5 participants
  • Holger Peters
  • Leo Famulari
  • Ludovic Courtès
  • Maxim Cournoyer
  • zimoun
Owner
unassigned
Submitted by
Holger Peters
Severity
normal
H
H
H
Holger Peters wrote on 4 Dec 2020 10:51
[PATCH] Remove duplicate path declaration
(address . 45039@debbugs.gnu.org)
ef7ab84bf54eb7ba6bd8ec31a3247096@posteo.de
* doc/guix.texi: Fixup path declaration.
---
doc/guix.texi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (14 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 889f380108..b86b81cfbf 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -2774,7 +2774,7 @@ the command prints and, similar to what we saw
above, paste these two
lines in your terminal and @file{.bash_profile}:

@example
-GUIX_PROFILE="$HOME/.config/guix/current/etc/profile"
+GUIX_PROFILE="$HOME/.config/guix/current"
. "$GUIX_PROFILE/etc/profile"
@end example

--
2.29.2
Z
Z
zimoun wrote on 4 Dec 2020 19:59
Re: [bug#45039] Duplicate folders in docs
(name . Holger Peters)(address . holger.peters@posteo.de)(address . 45039@debbugs.gnu.org)
CAJ3okZ3WqnQyWT8uEyCGVo+_XYG-5ALRSGkNgZ_aAr-P_sewMg@mail.gmail.com
Hi,

Thanks for the report.

On Fri, 4 Dec 2020 at 10:45, Holger Peters <holger.peters@posteo.de> wrote:

Toggle quote (3 lines)
> is a duplication of use of etc/profile

I am not sure to see where.

Could you send a patch?

All the best,
simon
Z
Z
zimoun wrote on 4 Dec 2020 20:01
(name . Holger Peters)(address . holger.peters@posteo.de)(address . 45039@debbugs.gnu.org)
CAJ3okZ3x+FHS37fPYnOVWtduLyzrFRD-jxoc5a22TC9m5kiCEQ@mail.gmail.com
Hi again,

On Fri, 4 Dec 2020 at 19:59, zimoun <zimon.toutoune@gmail.com> wrote:

Toggle quote (2 lines)
> Could you send a patch?

Sorry you did in the thread. :-)
Thank you.

All the best,
simon
L
L
Leo Famulari wrote on 4 Dec 2020 20:13
Re: [bug#45039] [PATCH] Remove duplicate path declaration
(name . Holger Peters)(address . holger.peters@posteo.de)
X8qKYcAvMM7Hyjvb@jasmine.lan
On Fri, Dec 04, 2020 at 10:51:37AM +0100, Holger Peters wrote:
Toggle quote (8 lines)
> * doc/guix.texi: Fixup path declaration.

> @example
> -GUIX_PROFILE="$HOME/.config/guix/current/etc/profile"
> +GUIX_PROFILE="$HOME/.config/guix/current"
> . "$GUIX_PROFILE/etc/profile"
> @end example

Thanks! That example is definitely not right...

However, it doesn't seem right to me either that GUIX_PROFILE should
point to '~/.config/guix/current/etc/profile'. That profile won't
contain anything useful related to packages the user installs. Compare
it to the contents of '~/.guix-profile/etc/profile' to see what I mean.

I alo was curious about the preceding paragraph, which states "Unless
you’re on Guix System, the first time you run guix pull, be sure to
follow the hint that the command prints [...]". I re-installed Guix on a
Debian system and it prints this instead:

------
hint: Consider setting the necessary environment variables by running:

GUIX_PROFILE="/root/.guix-profile"
. "$GUIX_PROFILE/etc/profile"

Alternately, see `guix package --search-paths -p "/root/.guix-profile"'.
------

CC-ing Ludovic (who wrote this section) for clarification.
Z
Z
zimoun wrote on 4 Dec 2020 21:46
86tut1b8qe.fsf@gmail.com
Hi Leo,

On Fri, 04 Dec 2020 at 14:13, Leo Famulari <leo@famulari.name> wrote:
Toggle quote (16 lines)
> On Fri, Dec 04, 2020 at 10:51:37AM +0100, Holger Peters wrote:
>> * doc/guix.texi: Fixup path declaration.
>
>> @example
>> -GUIX_PROFILE="$HOME/.config/guix/current/etc/profile"
>> +GUIX_PROFILE="$HOME/.config/guix/current"
>> . "$GUIX_PROFILE/etc/profile"
>> @end example
>
> Thanks! That example is definitely not right...
>
> However, it doesn't seem right to me either that GUIX_PROFILE should
> point to '~/.config/guix/current/etc/profile'. That profile won't
> contain anything useful related to packages the user installs. Compare
> it to the contents of '~/.guix-profile/etc/profile' to see what I mean.

Well, from my understanding, doing this:

GUIX_PROFILE=$HOME/.config/guix/current
. $GUIX_PROFILE/etc/profile

allows to have the guix commands that refer to the latest version “guix
pull”’ed. Moreover, you also have the last version of the manual with:

Toggle snippet (3 lines)
export INFOPATH="$HOME/.config/guix/current/share/info${INFOPATH:+:}$INFOPATH"

To me, the manual is right for this part. Maybe I am missing something.


Toggle quote (14 lines)
> I alo was curious about the preceding paragraph, which states "Unless
> you’re on Guix System, the first time you run guix pull, be sure to
> follow the hint that the command prints [...]". I re-installed Guix on a
> Debian system and it prints this instead:
>
> ------
> hint: Consider setting the necessary environment variables by running:
>
> GUIX_PROFILE="/root/.guix-profile"
> . "$GUIX_PROFILE/etc/profile"
>
> Alternately, see `guix package --search-paths -p "/root/.guix-profile"'.
> ------

Did you run “guix pull” as regular user?


All the best,
simon
L
L
Leo Famulari wrote on 4 Dec 2020 22:15
(name . zimoun)(address . zimon.toutoune@gmail.com)
X8qm4BwcCh+q0sn6@jasmine.lan
On Fri, Dec 04, 2020 at 09:46:01PM +0100, zimoun wrote:
Toggle quote (14 lines)
> Well, from my understanding, doing this:
>
> GUIX_PROFILE=$HOME/.config/guix/current
> . $GUIX_PROFILE/etc/profile
>
> allows to have the guix commands that refer to the latest version “guix
> pull”’ed. Moreover, you also have the last version of the manual with:
>
> --8<---------------cut here---------------start------------->8---
> export INFOPATH="$HOME/.config/guix/current/share/info${INFOPATH:+:}$INFOPATH"
> --8<---------------cut here---------------end--------------->8---
>
> To me, the manual is right for this part. Maybe I am missing something.

I suppose that one could source both 'etc/profile' directories, from
~/.guix-profile and ~/.config/guix/current.

Toggle quote (2 lines)
> Did you run “guix pull” as regular user?

No, as the root user. It's the only user on that server.
Z
Z
zimoun wrote on 4 Dec 2020 22:30
(name . Leo Famulari)(address . leo@famulari.name)
86r1o5b6os.fsf@gmail.com
Hi,

On Fri, 04 Dec 2020 at 16:15, Leo Famulari <leo@famulari.name> wrote:
Toggle quote (18 lines)
> On Fri, Dec 04, 2020 at 09:46:01PM +0100, zimoun wrote:
>> Well, from my understanding, doing this:
>>
>> GUIX_PROFILE=$HOME/.config/guix/current
>> . $GUIX_PROFILE/etc/profile
>>
>> allows to have the guix commands that refer to the latest version “guix
>> pull”’ed. Moreover, you also have the last version of the manual with:
>>
>> --8<---------------cut here---------------start------------->8---
>> export INFOPATH="$HOME/.config/guix/current/share/info${INFOPATH:+:}$INFOPATH"
>> --8<---------------cut here---------------end--------------->8---
>>
>> To me, the manual is right for this part. Maybe I am missing something.
>
> I suppose that one could source both 'etc/profile' directories, from
> ~/.guix-profile and ~/.config/guix/current.

My .bash_profile contains:

Toggle snippet (27 lines)
export GUIX_MYPROFILES=~/.config/guix/profiles
for p in $(ls --color=no -1 $GUIX_MYPROFILES)
do
profile=${GUIX_MYPROFILES}/${p}/${p}
if [ -d $profile ]
then
GUIX_PROFILE=$profile
. $profile/etc/profile
# unset $profile
fi
done
GUIX_PROFILE=$HOME/.guix-profile
. $GUIX_PROFILE/etc/profile

# the latest Guix version lives there
# needs to be first in the PATH
GUIX_PROFILE=$HOME/.config/guix/current
. $GUIX_PROFILE/etc/profile

# Ugly workaround
export PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH"
# ~/.config/current/bin/guix repl works with readline
export GUILE_LOAD_PATH="$HOME/.guix-profile/share/guile/site/3.0${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
# lastest info manual
export INFOPATH="$HOME/.config/guix/current/share/info${INFOPATH:+:}$INFOPATH"

Hope that helps.


Toggle quote (4 lines)
>> Did you run “guix pull” as regular user?
>
> No, as the root user. It's the only user on that server.

So, the message seems consistent, isn’t it? I am not sure better could
be done for the root user. Well, I do not know. :-)


All the best,
simon
L
L
Ludovic Courtès wrote on 7 Dec 2020 10:04
(name . Leo Famulari)(address . leo@famulari.name)
87v9de0yyb.fsf@gnu.org
Hi,

Leo Famulari <leo@famulari.name> skribis:

Toggle quote (11 lines)
> On Fri, Dec 04, 2020 at 10:51:37AM +0100, Holger Peters wrote:
>> * doc/guix.texi: Fixup path declaration.
>
>> @example
>> -GUIX_PROFILE="$HOME/.config/guix/current/etc/profile"
>> +GUIX_PROFILE="$HOME/.config/guix/current"
>> . "$GUIX_PROFILE/etc/profile"
>> @end example
>
> Thanks! That example is definitely not right...

Indeed; applying.

Toggle quote (5 lines)
> However, it doesn't seem right to me either that GUIX_PROFILE should
> point to '~/.config/guix/current/etc/profile'. That profile won't
> contain anything useful related to packages the user installs. Compare
> it to the contents of '~/.guix-profile/etc/profile' to see what I mean.

Note that GUIX_PROFILE here is a shell variable, not an environment
variable. It value matters only for the “.” that immediately follows.
After that, it no longer matters.

Toggle quote (16 lines)
> I alo was curious about the preceding paragraph, which states "Unless
> you’re on Guix System, the first time you run guix pull, be sure to
> follow the hint that the command prints [...]". I re-installed Guix on a
> Debian system and it prints this instead:
>
> ------
> hint: Consider setting the necessary environment variables by running:
>
> GUIX_PROFILE="/root/.guix-profile"
> . "$GUIX_PROFILE/etc/profile"
>
> Alternately, see `guix package --search-paths -p "/root/.guix-profile"'.
> ------
>
> CC-ing Ludovic (who wrote this section) for clarification.

Isn’t it what ‘guix install’ printed rather than what ‘guix pull’
printed?

For example, look:

Toggle snippet (14 lines)
$ guix pull -p /tmp/g
[…]
building profile with 1 package...
hint: Consider setting the necessary environment variables by running:

GUIX_PROFILE="/tmp/g"
. "$GUIX_PROFILE/etc/profile"

Alternately, see `guix package --search-paths -p "/tmp/g"'.


hint: After setting `PATH', run `hash guix' to make sure your shell refers to `/tmp/g/bin/guix'.

The hint is about this very profile, not about ~/.guix-profile.

Thanks,
Ludo’.
L
L
Leo Famulari wrote on 7 Dec 2020 20:31
(name . Ludovic Courtès)(address . ludo@gnu.org)
X86C/rtv5XN1vliY@jasmine.lan
On Mon, Dec 07, 2020 at 10:04:12AM +0100, Ludovic Courtès wrote:
Toggle quote (4 lines)
> Note that GUIX_PROFILE here is a shell variable, not an environment
> variable. It value matters only for the “.” that immediately follows.
> After that, it no longer matters.

Oooooh, right! My mistake...
M
M
Maxim Cournoyer wrote on 16 Jul 2021 04:09
Re: bug#45039: Duplicate folders in docs
(name . Ludovic Courtès)(address . ludo@gnu.org)
87im1bm2ly.fsf_-_@gmail.com
Hello,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (17 lines)
> Hi,
>
> Leo Famulari <leo@famulari.name> skribis:
>
>> On Fri, Dec 04, 2020 at 10:51:37AM +0100, Holger Peters wrote:
>>> * doc/guix.texi: Fixup path declaration.
>>
>>> @example
>>> -GUIX_PROFILE="$HOME/.config/guix/current/etc/profile"
>>> +GUIX_PROFILE="$HOME/.config/guix/current"
>>> . "$GUIX_PROFILE/etc/profile"
>>> @end example
>>
>> Thanks! That example is definitely not right...
>
> Indeed; applying.

Thanks!

Closing.

Maxim
Closed
?