Subject: bug#72996: SWH fallback for channels fails to grab ‘keyring’ branch

From: Ludovic Courtès <[email-masked]>
Date: Tue, 03 Sep 2024 10:13:04 +0200

I just noticed this bug:

--8<---------------cut here---------------start------------->8---
$ guix time-machine -q --url=http://example.org --commit=deac7dd04156b9358ea33200593fd260760f9d91 --  describe
Updating channel 'guix' from Git repository at 'http://example.org'...
SWH: found revision deac7dd04156b9358ea33200593fd260760f9d91 with directory at 'https://archive.softwareheritage.org/api/1/directory/7f14a91132dd62900df46290c401a1c7b0443e33/'
SWH vault: Creating final bundle

[...]

SWH vault: Uploading bundle
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/HEAD
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/branches/
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/config
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/description
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/hooks/
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/info/
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/info/exclude
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/info/refs
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/objects/
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/objects/info/
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/objects/info/packs
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/objects/pack/
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/objects/pack/pack-41ef0cfa2f7aad582ab32becd7c2f357dfaf24b3.idx
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/objects/pack/pack-41ef0cfa2f7aad582ab32becd7c2f357dfaf24b3.pack
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/refs/
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/refs/heads/
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/refs/heads/master
swh:1:rev:deac7dd04156b9358ea33200593fd260760f9d91.git/refs/tags/
guix time-machine: error: Git error: cannot locate remote-tracking branch 'origin/keyring'
$ (cd ~/.cache/guix/checkouts/s4nfmxeky5yp6czirwmkkb53qmvyaarbiqi63ase2c4ydjig3u7a; git branch -l)
* master
$ (cd ~/.cache/guix/checkouts/s4nfmxeky5yp6czirwmkkb53qmvyaarbiqi63ase2c4ydjig3u7a; git branch -lr)
  origin/HEAD -> origin/master
  origin/master
$ (cd ~/.cache/guix/checkouts/s4nfmxeky5yp6czirwmkkb53qmvyaarbiqi63ase2c4ydjig3u7a; git log |grep ^commit |wc -l)
137254
--8<---------------cut here---------------end--------------->8---

I’m not sure if it’s SWH providing us an incomplete bundle, or if we’re
just not asking for the right thing.

Ludo’.