[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#71631: [PATCH] swh: Specify 'extid_version' when looking up by exter
From: |
Ludovic Courtès |
Subject: |
bug#71631: [PATCH] swh: Specify 'extid_version' when looking up by external ID. |
Date: |
Thu, 27 Jun 2024 00:02:54 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi,
Simon Tournier <zimon.toutoune@gmail.com> skribis:
> Reported in <https://gitlab.softwareheritage.org/swh/meta/-/issues/5093>.
>
> * guix/swh.scm (swh-url): Don't redirect when URL contains 'extid_version'.
> (lookup-external-id): Specify 'extid_version' avoiding SWH's bug from past
> version.
>
> Change-Id: Iea2a5256e0612dae95567907bb11edb92a50df73
> ---
> guix/swh.scm | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>
> Hi,
>
> Without the patch:
>
> $ guix repl
> scheme@(guix-user)> (use-modules (guix swh) (gnu packages guile-xyz))
> scheme@(guix-user)> (lookup-directory-by-nar-hash
> (content-hash-value (origin-hash (package-source
> guile-wisp))) 'sha256)
> $1 = "swh:1:dir:218d95849f10fc0691d7dfa80999ce5061e654ef"
>
> This is incorrect. As explained in:
>
> https://gitlab.softwareheritage.org/swh/meta/-/issues/5093
>
> The mismatch comes from something unexpected on SWH side. That had been
> corrected and the way to access to the fix is to update the version; hence the
> patch.
>
> $ ./pre-inst-env guix repl
> scheme@(guix-user)> (use-modules (guix swh) (gnu packages guile-xyz))
> scheme@(guix-user)> (lookup-directory-by-nar-hash
> (content-hash-value (origin-hash (package-source
> guile-wisp))) 'sha256)
> $1 = "swh:1:dir:1f35a460673e2c8ccf948b8c18cb8c18d2ec24fe"
Woow.
I pushed it as bd908af0c619cb1b74afeeb07839d7af08de9d91 with a small
modification: ‘swh-url’ checks for parameters (the “?param=value” bit)
rather than “extid_version” specifically. I also moved the link to the
issue to ‘lookup-external-id’.
Thank you!
Ludo’.