all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Timothy Sample <samplet@ngyro.com>
Cc: 48437@debbugs.gnu.org
Subject: [bug#48437] [PATCH] lint: archival: Lookup content in Disarchive database.
Date: Tue, 18 May 2021 23:47:45 +0200	[thread overview]
Message-ID: <87a6or67em.fsf_-_@gnu.org> (raw)
In-Reply-To: <87o8d8loey.fsf@ngyro.com> (Timothy Sample's message of "Mon, 17 May 2021 23:19:01 -0400")

Hi!

Timothy Sample <samplet@ngyro.com> skribis:

> Ludovic Courtès <ludo@gnu.org> 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.)

Yes, I thought we could assume the contents were necessarily in the
archive.

> 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....

Hmm yeah.  There’s no API to deserialize the (disarchive …) sexp as a
record, right?

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

Maybe we can assume (with a comment) that the SWHID points to a valid
content, and when creating the Disarchive database we actually make sure
this is the case?

More generally, we need to talk about that database, how to create it
and maintain it.  :-)

Thanks,
Ludo’.




  reply	other threads:[~2021-05-18 21:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-15 10:28 [bug#48437] [PATCH] lint: archival: Lookup content in Disarchive database Ludovic Courtès
2021-05-18  3:19 ` Timothy Sample
2021-05-18 21:47   ` Ludovic Courtès [this message]
2021-05-21 10:27     ` [bug#48437] [PATCH v2] " Ludovic Courtès
2021-05-22 21:52       ` bug#48437: [PATCH] " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a6or67em.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=48437@debbugs.gnu.org \
    --cc=samplet@ngyro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.