unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 65979@debbugs.gnu.org
Subject: bug#65979: incorrect “guix hash” for FastQC
Date: Tue, 26 Sep 2023 18:23:00 +0200	[thread overview]
Message-ID: <CAJ3okZ0EB+uPLFsouk20JCKoL3gm000LSqH7Sxfe_dk9rqsQLA@mail.gmail.com> (raw)
In-Reply-To: <87pm252h3c.fsf@gnu.org>

Hi,

On Tue, 26 Sept 2023 at 15:34, Ludovic Courtès <ludo@gnu.org> wrote:

> There are two things are:
>
>   1. ‘vcs-file?’, used by ‘guix hash -rx’;
>
>   2. ‘git-fetch’, which does (delete-file-recursively ".git").

Yes.

> Clearly #2 is correct (it’s perfectly fine to have a ‘.svn’ directory in
> a Git repo), whereas #1 is an approximation that, in corner cases like
> this one, gives the wrong answer.

These corner cases matter for some SWH loader implementing Nar hashes
in Python.  Since they load sources.json (conversion of hash checksum
from package recipe), read the Nar hash and compare it with the one
they internal compute, then they need to implement in Python the
correct behavior.

See https://gitlab.softwareheritage.org/swh/devel/swh-loader-git/-/issues/4751#note_149180
and all the thread for context.


> My take is that it’s OK to keep ‘vcs-file?’ as is: the best we could do
> would be to add complicated heuristics in the hope corner cases like
> this one would be better dealt with, but it wouldn’t be bullet-proof
> anyway.

Well, the question is what other VCS as 'svn-fetch', etc. are doing?

Maybe, we can just have a special case for Git repository.

Somehow, since the problem needs to be solved for SWH, the same
solution applies for vcs-file? and "guix hash", no?

Cheers,
simon




  reply	other threads:[~2023-09-26 16:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 16:46 bug#65979: incorrect “guix hash” for FastQC Simon Tournier
2023-09-26 13:00 ` Simon Tournier
2023-09-26 13:34   ` Ludovic Courtès
2023-09-26 16:23     ` Simon Tournier [this message]
2023-10-01 15:07       ` Ludovic Courtès
2023-10-01 15:24         ` Simon Tournier
2023-10-17 17:56     ` Simon Tournier
2023-09-26 13:29 ` 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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=CAJ3okZ0EB+uPLFsouk20JCKoL3gm000LSqH7Sxfe_dk9rqsQLA@mail.gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=65979@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).