help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Install `guix pull'ed Guix to target partition on system install


From: zimoun
Subject: Re: Install `guix pull'ed Guix to target partition on system install
Date: Mon, 21 Dec 2020 17:26:59 +0100

Hi,

On Mon, 21 Dec 2020 at 15:47, Pierre Neidhardt <mail@ambrevar.xyz> wrote:

>> I am not familiar with the installation process.  I miss where this
>> first “guix pull” writes:
>>
>>  - the cached checkout
>>  - the store items
>
> The first "guix pull" write in memory (RAM), so it's all ephemeral.
>
>> I am expecting that the first “pull“ writes both on the target.
>
> Nope! :(
>
>> If not, i.e., it writes on the installation target, yeah it could be
>> improved. :-)
>
> No, the first "guix pull" does not write on the installation target.
> But I guess that's what you meant ;)
>
>> From your initial message, my understanding was the first pull writes:
>>
>>  - the cached checkout in /root/.cache/guix/checkouts
>>  - the store items in /gnu/store
>
> Which is in memory.
>
>> then your second pull writes:
>>
>>  - the cached checkout in /home/user/.cache/guix/checkouts
>>  - the store items in /gnu/store
>
> After rebooting, so this /gnu/store is _not the same_ as the one during
> installation.

Therefore, the missing store items from the RAM store could be
transferred to installation target via ‘guix archive’.  But I am
surprised that after rebooting this /gnu/store misses items that you
need when you run “guix pull” as root.

Well, I am missing something on how all the installation process works… :-)


>> Therefore, the repo is cloned twice and derivations are also computed
>> twice; but it seems hard to avoid by design.
>
> Maybe we could fix this by having a "base Guix clone" in the store, and
> then when we run Guix pull, it first checks out this store repo, only to
> run "git pull" afterwards.  This would save a lot of time.

What I miss in your problem is:

  # guix pull # writes in memory (1)
  # guix system init 
  # reboot                       
  # guix pull # writes in disk   (2)
  $ guix pull # writes in disk   (3)

(The steps (2) and (3) are not necessary done chronologically.)


(1) is slow,  (2) should not clone.  Is (2) cloning?

What you are proposing is to improve (3), right?  Instead of cloning
from Savannah and so populate ~/.cache/guix/checkouts, you are proposing
that between (1) and (3), «something» creates a store item with the full
clone from Savannah, then (3) copies from this store item to
~/.cache/guix/checkouts if it does not exist, and run “git pull” there.
But I do not think the “cloning” part is the consuming one here; even if
it obviously depends on the network.

And it is does only once in life. ;-)

Example with a poor network via my smartphone:

--8<---------------cut here---------------start------------->8---
$ time guix pull
Updating channel 'guix' from Git repository at 
'https://git.savannah.gnu.org/git/guix.git'...
Building from this channel:
  guix      https://git.savannah.gnu.org/git/guix.git   5ecc0b1
Computing Guix derivation for 'x86_64-linux'... -
nothing to be done

real    0m56.022s
user    1m16.139s
sys     0m0.887s

$ rm -fr 
~/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq 
$ time guix pull
Updating channel 'guix' from Git repository at 
'https://git.savannah.gnu.org/git/guix.git'...
Building from this channel:
  guix      https://git.savannah.gnu.org/git/guix.git   5ecc0b1
Computing Guix derivation for 'x86_64-linux'... -
nothing to be done

hint: After setting `PATH', run `hash guix' to make sure your shell refers to 
`/home/simon/.config//guix/current/bin/guix'.


real    4m15.202s
user    3m8.522s
sys     0m5.010s
--8<---------------cut here---------------end--------------->8---


All the best,
simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]