[Top][All Lists]

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

Re: guix time-machine, broken hash in an old package definition, a worka

From: Wiktor Żelazny
Subject: Re: guix time-machine, broken hash in an old package definition, a workaround?
Date: Fri, 22 Jan 2021 12:36:06 +0100

On Wed, Jan 20, 2021 at 04:03:09PM +0100, zimoun wrote:

> I was thinking to add MRAN as fallback for CRAN packages.  I will give
> a look.

Hi simon,

Would be cool, however for MRAN you also need the snapshot date. Would
it be feasible to extract it from the commit date? There are dates at
CRAN, but for the archived package versions these are “Last modified”.
There is also “Date/Publication:” field in the tarball, but you wouldn’t
trust a tarball with a hash mismatch.

> I bet that removing the inferior still works, for example:
> --8<---------------cut here---------------start------------->8---
> $ cat manifest.scm
> ;; Maybe adding modules
> (define-public r-foreign-fixed
>   (package (inherit r-foreign)
>            (version "0.8-75-fixed")
>            (source
>             (origin
>               (method url-fetch)
>               (uri
> "";)
>               (sha256
>                (base32
>                 "0g4mi101srjbl17ydb2hl3854m3xj0llj6861lfr30sp08nkqavl"))))))
> (specifications->manifest
>  (list
>   "r"
>   "r-foreign@0.8-75-fixed"))
> $ guix time-machine --commit=d81fb2a \
>            -- environment -m manifest.scm
> --8<---------------cut here---------------end--------------->8---

I cannot check it. This approach works, but for some mysterious reason
it also works when I remove the r-foreign-fixed definition and constrain
the manifest to r. Without the definition, I would expect guix to try
building r-foreign from CRAN. I thought that maybe guix treated
r-foreign@0.8-75 and r-foreign@0.8-75-fixed as exchangeable because of
the same hash, even if the versions and URIs differed, and so did not
try to build r-foreign@0.8-75, but used r-foreign@0.8-75-fixed from the
store. However, with `guix time-machine … -- build r-foreign@0.8-75`,
I’m getting a different output than for `guix time-machine … -- build
r-foreign@0.8-75-fixed`. I tried `guix gc <path to r>` to force the
rebuild, but I got the “still alive” error, even though I had exited the

I will just trust your expertise on that, and keep your solution. I can
always go back to the inferior if it turns out to fail when I encounter
the hash mismatch problem sometime in the future.

> (As previously shown in this thread.)

Sorry, I somehow hard-coded in my head that those were “game over”’s and
did not review them after MRAN had “changed the game”.

Have a nice weekend,


Attachment: signature.asc
Description: PGP signature

reply via email to

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