guix-devel
[Top][All Lists]
Advanced

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

Re: wishlist: Guix tagging/logging


From: zimoun
Subject: Re: wishlist: Guix tagging/logging
Date: Wed, 4 Mar 2020 15:32:33 +0100

On Wed, 4 Mar 2020 at 09:16, Pierre Neidhardt <address@hidden> wrote:
>
> zimoun <address@hidden> writes:
>
> > We could imagine that Guix (optionally) checkouts the complete repo
> > and this Git repo is the database. (Note that Guix already checkouts
> > some more or less large parts or the repo.)
>
> A drawback is that the Git repo is huge and expensive to clone.
> Also it would be nice if the user could create virtual tags, that is to
> say, without having their own clone of the Guix repo (because it's
> expensive).

It is already "huge and expensive". Give a look at:

--8<---------------cut here---------------start------------->8---
du -sh ~/.cache/guix/*
1.2G    /home/simon/.cache/guix/checkouts
9.7M    /home/simon/.cache/guix/http
8.0K    /home/simon/.cache/guix/inferiors
329M    /home/simon/.cache/guix/pull
222M    /home/simon/.cache/guix/substitute
--8<---------------cut here---------------end--------------->8---

And if you use regularly "guix time-machine" with different commits,
you have already some checkouts.

Last, note that the "huge and expensive" part is not the downloading
part, but the storage of the .scm files.
For example,

--8<---------------cut here---------------start------------->8---
du -sh ~/.cache/guix/checkouts/*
328M    
~/.cache/guix/checkouts/2zjgqq3yxnpiyamyqsqcurbyj3gb2suroq5jympr4ej3mqfzq4oa
209M    
~/.cache/guix/checkouts/5cm2wsegguxwkzg5hjgitjtqrkt3rkdbqfadxr734umsv4mh66ya
395M    
~/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq
1.4M    
~/.cache/guix/checkouts/qcl7k7z35uutwy6b5fjkzqupfxeokcwqmlexkwmqlmoklosybyka
1.7M    
~/.cache/guix/checkouts/qzs5gpwlvfiigfcdqtmcqdrzdl5wdk7hsal5nyetzdjolcvxcvya
214M    
~/.cache/guix/checkouts/utzfc5hcbrwkfzpmyvucrvoz2klqxig3rstebsf7ehtkdm77xnsq
1.2M    
~/.cache/guix/checkouts/v4suojkdt3rogvagkns44b4muehmwxqyg37cvnnau43fk777d2ha
53M     
~/.cache/guix/checkouts/zw2o4kxknhggvaztdo7jnxbmvkncthjbgkppwazw7qbkqlqyhgua
--8<---------------cut here---------------end--------------->8---


Then let's go to
'~/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq'

--8<---------------cut here---------------start------------->8---
git log | tail
    Split (guix) in (guix store) and (guix derivations).

    * guix.scm: Move contents to other files.  Just aggregate these.
    * guix/derivations.scm, guix/store.scm: New files.

commit 207cba8114d354737b231e510d6110ea2a42e07b
Author: Ludovic Courtès <address@hidden>
Date:   Wed Apr 18 23:21:11 2012 +0200

    Initial commit.
--8<---------------cut here---------------end--------------->8---

and

--8<---------------cut here---------------start------------->8---
git log | head
commit be54abc61d4193fe3bee4bd62cc33412a9314975
Author: Nicolas Goaziou <address@hidden>
Date:   Tue Mar 3 19:23:17 2020 +0100

    gnu: wine-staging: Update to 5.3.

    * gnu/packages/wine.scm (wine-staging-patchset-data): Update to 5.3.
    (wine-staging): Update hash.
--8<---------------cut here---------------end--------------->8---

And just for the record, "guix describe" returns ' guix be54abc'.



I do not know exactly the internals of Guix but the full Git repo
seems already cloned; somehow. Therefore, it appears to me easier to
add tags (or to expose more Git features) using this database instead
of creating a new one, IMHO.


(And because that, I do not know how the inferiors work but maybe
'worktree' could improve the efficiency; especially the "Updating"
part when using "guix time-machine".)


> It's lightweight to transfer an s-exp mapping of commits-tags to another
> machine.  It's costsly to transfer the full Guix repo.

I am not saying that I would like to transfer the full Guix repo. :-)
I am saying that the tags should be stored in the Git repo database
(already locally there, see above) and then some 'exporter/importer'
to s-exp file in order to ease the transfer (lightweight, easy to have
under version control, etc.).


> > And the tags could be exported to a s-exp file, go under version
> > control and shared; with an importer tags.
>
> This could fit the ~/.config/guix/config.scm we've been waiting for :D

Yes, I agree. :-)


Cheers,
simon



reply via email to

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