GNU bug report logs -
#44187
Channel clones lack SWH fallback
Previous Next
Reported by: zimoun <zimon.toutoune <at> gmail.com>
Date: Fri, 23 Oct 2020 22:18:01 UTC
Severity: important
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #36 received at 44187 <at> debbugs.gnu.org (full text, mbox):
Hi Ludo,
The patch LGTM although there is a redundancy, from my understanding.
On Fri, 10 Sep 2021 at 16:34, Ludovic Courtès <ludo <at> gnu.org> wrote:
> @@ -694,7 +714,15 @@ wait until it becomes available, which could take several minutes."
> (format log-port "SWH: found revision ~a with directory at '~a'~%"
> (revision-id revision)
> (swh-url (revision-directory-url revision)))
> - (swh-download-directory (revision-directory revision) output
> - #:log-port log-port))
> + (swh-download-archive (match archive-type
> + ('flat
> + (string-append
> + "swh:1:dir:" (revision-directory revision)))
> + ('git-bare
> + (string-append
> + "swh:1:rev:" (revision-id revision))))
Here the ’swid’ depends on the ’archive-type’…
> + output
> + #:archive-type archive-type
…which is also passed. Then this is propagated. For instance,
’swh-download-directory’:
> +(define* (swh-download-directory id output
> + #:key (log-port (current-error-port)))
> + "Download from Software Heritage the directory with the given ID, and
> +unpack it to OUTPUT. Return #t on success and #f on failure."
> + (swh-download-archive (string-append "swh:1:dir:" id) output
> + #:archive-type 'flat
> + #:log-port log-port))
> +
Does it make sense to pass this ’swhid’ equal to ’swh:1:rev’ with the
’flat’ archive-type? Another instance is,
> + (match (vault-fetch swhid
> + #:archive-type archive-type
> + #:log-port log-port)
and from my understanding, again ’swhid’ depends on ’archive-type’.
Therefore, it prone error. The best seems to pass ’(archive-type
. swhid)’ and pattern-match on that. Yeah, it potentially breaks the
public API… but there is no claim about stability (and I am not
convinced this (guix swh) module is used outside Guix :-)).
Cheers,
simon
This bug report was last modified 3 years and 302 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.