unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: wishlist: Guix tagging/logging
Date: Wed, 4 Mar 2020 15:32:33 +0100	[thread overview]
Message-ID: <CAJ3okZ1knbD-pyoyrqjoYrPB5CtGWsuFrVtXHBKYSH8GQGynTg@mail.gmail.com> (raw)
In-Reply-To: <87zhcwbkmp.fsf@ambrevar.xyz>

On Wed, 4 Mar 2020 at 09:16, Pierre Neidhardt <mail@ambrevar.xyz> wrote:
>
> zimoun <zimon.toutoune@gmail.com> 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 <ludo@gnu.org>
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 <mail@nicolasgoaziou.fr>
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	other threads:[~2020-03-04 14:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28 11:18 wishlist: Guix tagging/logging zimoun
2020-02-11  8:47 ` Pierre Neidhardt
2020-03-03 22:56   ` zimoun
2020-03-04  8:16     ` Pierre Neidhardt
2020-03-04 14:32       ` zimoun [this message]
2020-03-04 15:52         ` Pierre Neidhardt
2020-03-04 16:23           ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ3okZ1knbD-pyoyrqjoYrPB5CtGWsuFrVtXHBKYSH8GQGynTg@mail.gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=mail@ambrevar.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).