Hi, On Sun, 12 Feb 2023 at 01:10, Ludovic Courtès <l...@gnu.org> wrote:
>> The principle is simple: get commit and directory info from the profile >> manifest, compare commits, if commits for all channels are the same, do >> not try to update the profile. Indeed, some improvements could be done in that direction. For instance, --8<---------------cut here---------------start------------->8--- $ guix describe Generation 89 Jan 17 2023 15:20:08 (current) guix 29efa27 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 29efa2791dafb042ca8ace77bcf8538fb404d492 $ guix pull --commit=29efa27 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 29efa27 Computing Guix derivation for 'x86_64-linux'... | [...] --8<---------------cut here---------------end--------------->8--- Going from one commit to the exact same commit should not trigger some intensive «Computing Guix derivation». Note that if I run “guix pull --commit=29efa27” two times in row, the second one it displays: «nothing to be done» after «Computing Guix derivation». Last, note that: /var/guix/profiles/per-user/simon/current-guix -> current-guix-90-link and --8<---------------cut here---------------start------------->8--- $ /var/guix/profiles/per-user/simon/current-guix-90-link/bin/guix describe guix 29efa27 repository URL: https://git.savannah.gnu.org/git/guix.git commit: 29efa2791dafb042ca8ace77bcf8538fb404d492 $ /var/guix/profiles/per-user/simon/current-guix-89-link/bin/guix describe guix 29efa27 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 29efa2791dafb042ca8ace77bcf8538fb404d492 $ readlink -f /var/guix/profiles/per-user/simon/current-guix-90-link /gnu/store/g32zjrbr40fzp1rj5i6gx7hal20myfyv-profile $ readlink -f /var/guix/profiles/per-user/simon/current-guix-89-link /gnu/store/pk1i1dsagdby5pqydmvfbffg0i80wwvy-profile $ diff -r --no-dereference \ /gnu/store/g32zjrbr40fzp1rj5i6gx7hal20myfyv-profile/manifest \ /gnu/store/pk1i1dsagdby5pqydmvfbffg0i80wwvy-profile/manifest 12c12 < "/gnu/store/96bibk75vy5yvmilnycd8pl0l2bydcww-guix-29efa2791" --- > "/gnu/store/ldp0snjsac6hp1fikk5b8413pihm77di-guix-29efa2791" 20c20 < (branch #f) --- > (branch "master") --8<---------------cut here---------------end--------------->8--- Hum, maybe I have something twisted somewhere in my configuration. From my understanding, it comes from (guix scripts pull): --8<---------------cut here---------------start------------->8--- (match (find guix-channel? channels) ((? channel? guix) ;; Apply '--url', '--commit', and '--branch' to the 'guix' channel. (let ((url (or url (channel-url guix)))) (cons (match ref (('commit . commit) (channel (inherit guix) (url url) (commit commit) (branch #f))) --8<---------------cut here---------------end--------------->8--- where ’branch’ should not be #f but instead inherit from ’guix’. I remember discussing this but I do not find where. :-) > One marginal improvement would be sharing the cache that ‘time-machine’ > uses with ‘guix pull’. Last I looked it wasn’t as easy as one might > hope, but I forgot the details. It could be nice! :-) Last time I gave a look, I had an headache. ;-) Cheers, simon