From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: Re: wishlist: Guix tagging/logging Date: Wed, 4 Mar 2020 15:32:33 +0100 Message-ID: References: <871rr133yk.fsf@ambrevar.xyz> <87zhcwbkmp.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:58514) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9V4x-0007Po-57 for guix-devel@gnu.org; Wed, 04 Mar 2020 09:32:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9V4v-0007er-Vm for guix-devel@gnu.org; Wed, 04 Mar 2020 09:32:55 -0500 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:44783) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j9V4v-0007d8-RI for guix-devel@gnu.org; Wed, 04 Mar 2020 09:32:53 -0500 Received: by mail-qt1-x82d.google.com with SMTP id h16so1449430qtr.11 for ; Wed, 04 Mar 2020 06:32:51 -0800 (PST) In-Reply-To: <87zhcwbkmp.fsf@ambrevar.xyz> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Pierre Neidhardt Cc: Guix Devel On Wed, 4 Mar 2020 at 09:16, Pierre Neidhardt wrote: > > zimoun 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/2zjgqq3yxnpiyamyqsqcurbyj3gb2suroq5jympr4ej= 3mqfzq4oa 209M ~/.cache/guix/checkouts/5cm2wsegguxwkzg5hjgitjtqrkt3rkdbqfadxr734um= sv4mh66ya 395M ~/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj= 7apsnalwq 1.4M ~/.cache/guix/checkouts/qcl7k7z35uutwy6b5fjkzqupfxeokcwqmlexkwmqlmo= klosybyka 1.7M ~/.cache/guix/checkouts/qzs5gpwlvfiigfcdqtmcqdrzdl5wdk7hsal5nyetzdj= olcvxcvya 214M ~/.cache/guix/checkouts/utzfc5hcbrwkfzpmyvucrvoz2klqxig3rstebsf7eht= kdm77xnsq 1.2M ~/.cache/guix/checkouts/v4suojkdt3rogvagkns44b4muehmwxqyg37cvnnau43= fk777d2ha 53M ~/.cache/guix/checkouts/zw2o4kxknhggvaztdo7jnxbmvkncthjbgkppwazw7qb= kqlqyhgua --8<---------------cut here---------------end--------------->8--- Then let's go to '~/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnal= wq' --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=C3=A8s 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 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