unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Wiktor Żelazny" <wz@freeshell.de>
To: help-guix@gnu.org
Subject: Re: guix time-machine, broken hash in an old package definition, a workaround?
Date: Fri, 22 Jan 2021 12:36:06 +0100	[thread overview]
Message-ID: <20210122113606.iogodbik5prg5xhm@wzguix> (raw)
In-Reply-To: <CAJ3okZ1HBJK0-9VneqibEMpDN-6kpcJBVU-PvBXm6qy7=BPLUw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2579 bytes --]

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
> "https://cran.microsoft.com/snapshot/2020-01-27/src/contrib/foreign_0.8-75.tar.gz")
>               (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
environment.

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,

WŻ

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

  reply	other threads:[~2021-01-22 11:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 13:22 guix time-machine, broken hash in an old package definition, a workaround? Wiktor Żelazny
2021-01-13 16:24 ` zimoun
2021-01-13 19:28   ` Wiktor Żelazny
2021-01-13 18:57 ` Leo Famulari
2021-01-13 19:37   ` Wiktor Żelazny
2021-01-13 20:44     ` Leo Famulari
2021-01-14  8:30       ` Wiktor Żelazny
2021-01-14  9:48         ` zimoun
2021-01-14 19:00           ` Wiktor Żelazny
2021-01-14 20:29             ` zimoun
2021-01-15 20:18               ` Wiktor Żelazny
2021-01-15 20:48                 ` zimoun
2021-01-18  8:57                   ` Wiktor Żelazny
2021-01-18  9:11                     ` Wiktor Żelazny
2021-01-20  9:35                 ` Wiktor Żelazny
2021-01-20 10:15                   ` zimoun
2021-01-20 12:26                     ` Wiktor Żelazny
2021-01-20 15:03                       ` zimoun
2021-01-22 11:36                         ` Wiktor Żelazny [this message]
2021-01-22 16:29                           ` zimoun

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=20210122113606.iogodbik5prg5xhm@wzguix \
    --to=wz@freeshell.de \
    --cc=help-guix@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.
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).