guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#50072] [PATCH v2 3/4] refresh: Support non-tarball sources.


From: Ludovic Courtès
Subject: [bug#50072] [PATCH v2 3/4] refresh: Support non-tarball sources.
Date: Mon, 03 Jan 2022 14:55:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi Maxime,

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

Maxime Devos <maximedevos@telenet.be> skribis:

> From: Sarah Morgensen <iskarian@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’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]