Subject: [bug#48437] [PATCH] lint: archival: Lookup content in Disarchive database.

From: Timothy Sample <[email-masked]>
Date: Mon, 17 May 2021 23:19:01 -0400

Hello,

Ludovic Courtès <[email-masked]> writes:

> This patch makes the ‘archival’ checker check the Disarchive database(s)
> when SWH ‘lookup-content’ returns #f.  [...]
>
> It assumes that the swhid found in the Disarchive metadata is valid, a
> reasonable assumption IMO.
>
> Thoughts?

One thing to consider is that just because Disarchive has captured an
archive’s metadata and computed the SWHID of its contents doesn’t mean
that the contents are actually in the SWH archive.  (Maybe that’s what
you meant when you wrote about valid IDs above.)  It would be neat if
the lint check looked up the SWHID to see if it exists.  Unfortunately,
Disarchive doesn’t make getting the underlying SWHID easy at the moment.
One option would be to pass a resolver to “disarchive-assemble” that
exfiltrates the ID using “set!”.  Another one would be to “read” the
specification and search for a form like ‘(swhid "swh:1:dir:...")’.
Neither is particularly lovely....

Other than that, the code looks good and everything seems to work.  :)

-- Tim