Subject: Re: bug#31907: New users get wrong/old profile path to guix after reconfiguring

From: [email-masked]
Date: Tue, 26 Jun 2018 04:06:01 -0700

On 2018-06-20 23:35, [email-masked] wrote:
> Hello swedebugia,

..snip 
 
> ~/.config/guix/current is created by the new ‘guix pull’.  So when
> coming from 0.14, you actually need to run it twice: the first run will
> give you the new ‘guix pull’, and the second run will actually run the
> new code and create ~/.config/guix/current.

I understand. This is not the problem.

I wrote yesterday on #guix:

<sdb> hi guix
<sdb> I wonder if any of "pull" or "system reconfigure" update the guix
in the system profile?
<sdb> My system profile in sdb1@antelope ~$ ls -l
/run/current-system/profile/bin/guix
<sdb> lrwxrwxrwx 2 root root 75  1 jan  1970
/run/current-system/profile/bin/guix ->
/gnu/store/avg3vnk6p752z8iwld6yzv1wg7ki48vp-guix-0.14.0-13.7af5c2a/bin/guix
<sdb> even though I have pulled and reconfigured multiple times:
<sdb> as root
<sdb> root@antelope /home/sdb1# guix pull -l
<sdb> Generation 1 jun 18 2018 19:26:00
<sdb>   guix b4eae99
<sdb>     repository URL: https://git.savannah.gnu.org/git/guix.git
<sdb>     commit: b4eae997fe5b928f179c34d281e9f2c3eccd3670
<sdb> Generation 2 jun 22 2018 20:48:03 (current)
<sdb>   guix 8edebd3
<sdb>     repository URL: https://git.savannah.gnu.org/git/guix.git
<sdb>     commit: 8edebd3207335aff15081458e895104ac9f45d3d
<sdb> You could ask: why care about the guix version in the system
profile at all? It is not used as soon as you run guix pull or populated
the .config/guix some other way and adjusted the this to preceede in the
PATH.
<sdb> I care because if I create a new user via config.scm they by
default get access to an outdated guix when a newer is available. This
is in my view a bug.

Maybe its me who do not fully understand how system profiles is supposed
to work. I tried looking into the source but it was not clear to me how
it is supposed to work together.

The manual does not mention when/how the system profile gets updated. I
supposed it happens when a new profile derivation is built during
reconfigure. Maybe this is not correct. Maybe guix is supposed to be in
the system profile after all (I dont specify it in my config.scm ATM and
none of the templates do either)

Cheers
sdb