GNU bug report logs - #50072
[PATCH WIP 0/4] Add upstream updater for git-fetch origins.

Previous Next

Package: guix-patches;

Reported by: Sarah Morgensen <iskarian <at> mgsn.dev>

Date: Sun, 15 Aug 2021 23:17:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: Sarah Morgensen <iskarian <at> mgsn.dev>, 50072 <at> debbugs.gnu.org
Subject: [bug#50072] [PATCH v2 3/4] refresh: Support non-tarball sources.
Date: Mon, 03 Jan 2022 14:55:19 +0100
Hi Maxime,

Thanks for the updated patch set!  Overall it LGTM.  I found this one
bug:

Maxime Devos <maximedevos <at> telenet.be> skribis:

> From: Sarah Morgensen <iskarian <at> mgsn.dev>
>
> * guix/scripts/refresh.scm (update-package): Use 'file-hash*' instead of
> 'port-sha256'.  Rename TARBALL to OUTPUT.

[...]

> -                (let ((hash (call-with-input-file tarball
> -                              port-sha256)))
> +                (let ((hash (file-hash* output)))

This is incorrect because ‘file-hash*’ defaults to #:recursive? #t (IOW
it computes the hash of a nar containing OUTPUT instead of the hash of
OUTPUT).  You can see the problem for instance by running:

  ./pre-inst-env guix refresh -u mailutils && \
  ./pre-inst-env guix build -S mailutils
  # hash mismatch error

I think we need to check whether OUTPUT is a file or a directory and
pass #:recursive? accordingly.

WDYT?

Thanks,
Ludo’.




This bug report was last modified 3 years and 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.