Hi guix!

I studied this today and figured it out finally. 

Long story short, I reacted to connectivity issues on Savannah by trying
to pull from a local filesystem clone of the Guix repo. Did several
tribulations back and forth between my local clone, Codeberg and
Savannah, only to be plagued by "object not found" git errors.

It was quite simple really. I found out today that the procedure
'channels-with-substitutes-available' overrides the 'commit' member in
the 'channel' type record it takes as argument, but not its 'url'
member. This has the effect of negating both the commit and/or the
branch defined by the channel form itself.

And it's actually documented, a little bit "en-passant" though if you
ask me.

If a user's 'guix channel is wrapped in that procedure, it will always
try to pull one of the very latest commit of the master branch of the
official project repo, but it will try to pull it from the url that the
user has defined in his channels.scm.

When my local copy's master branch was behind the official repo's master
branch, I could only get a git error for trying to pull a non-existing
commit of the repo returned in the channel list.

The second problem I experienced might be considered as a subtle bug,
although it's a corner case. I remember that on occasions, when I
changed my 'guix channel definition from my local clone back to the
official channel, I had to wait until a new commit was done on the its
master branch before I could pull again without error: there may be
situations where the pulling Guix incorrectly assumes early that it has
the latest substituted commit in a checkout, based on some metadata
generated from the overriding commit hash, only for guile-git to realize
later it's actually not there.

Ludovic Courtès <[email protected]> writes:

> Hello,
>
> Runciter via <[email protected]> writes:
>
>> I'm in China. In the last 2 weeks, I've been plagued with errors 502 or
>
> This has been happening for several months now.  A couple of months ago,
> we set up a mirror (announced on info-guix); you can fetch from it like
> so:
>
>   guix pull --url=https://codeberg.org/guix/guix-mirror
>
>> I tried one time to pull from Codeberg but I also got "object not found"
>> on the same object which was complained when trying to use the local
>> file system clone.
>
> We’d need a clearer bug report with all the details here: command used,
> error message, etc.
>
>> Hence my questions:
>>
>> Was there a recent change - to guix, libgit, guile-git, ... - such that
>> the checkouts under ~/.cache/guix/checkouts are not used by guix pull as
>> ubiquitously as before?
>
> No.
>
>> In normal or less-than-normal-such-as-mine circumstances, should it be
>> considered a dangerous action to delete the cache of guix checkouts
>> under ~/.cache/guix?
>
> No, you can safely delete it as long as there’s no ‘guix’ process
> accessing it while you’re deleting it.
>
>> What is at this time the recommended way to trigger a full re-clone and
>> re-authentication of guix channels from an already installed system or
>> home, if any?
>
> Full reclone can be forced by “rm -rf ~/.cache/guix/checkouts”.  Full
> reauthentication really isn’t needed, but if you insist: “rm -rf
> ~/.cache/guix/authentication”.
>
> HTH!
>
> Ludo’.

Regards,

-- 
Runciter

Reply via email to