all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: "Wiktor Żelazny" <wz@freeshell.de>, help-guix@gnu.org
Subject: Re: guix time-machine, broken hash in an old package definition, a workaround?
Date: Wed, 20 Jan 2021 11:15:17 +0100	[thread overview]
Message-ID: <86czxz9aoa.fsf@gmail.com> (raw)
In-Reply-To: <20210120093514.hwd5ojuvrbzluu6a@wzguix>

Hi,

On Wed, 20 Jan 2021 at 10:35, Wiktor Żelazny <wz@freeshell.de> wrote:
> On Fri, Jan 15, 2021 at 09:19:01PM +0100, Wiktor Żelazny wrote:
>
>> A new idea: I just checked “CRAN Time Machine” at MRAN. The tarball
>> with the 0g4mi101srjbl17ydb2hl3854m3xj0llj6861lfr30sp08nkqavl hash is
>> there.
>
> A solution with an inferior:

Your solution could be error prone, IMHO.

> in guix-packages.git/local/cran.scm (guix-packages.git is a local git repo):
>
>    (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"))))))

Cool if Microsoft support long time archive of CRAN packages.  Well, it
seems possible to use it as fallback.

>    (packages->manifest
>     (list (first (lookup-inferior-packages inferior "r-foreign" "0.8-75-fixed"))
>           (specification->package "r")))

Here, the package “r-foreign” come from d81fb2a and so it is built using
the R build system from d81fb2a.

However, the package “r” come from the current Guix, i.e., the Guix when
the manifest is called.  Therefore, the “r-foreign” and “r” packages
could be incompatible.  For example, if “r-foreign” is built with R 3.x
and “r” with R 3.y maybe these two R versions use a different bytecode
for their VMs.

> $ guix time-machine --commit=d81fb2ae9443994ae5dd1cb5837276fad63f842c --channels=channel-specs.scm -- \
>   environment -C --pure --manifest=manifest.scm

Specifying --commit and --channels is redundant.  Other said, the
--commit is not necessary because it is already provided by your
’channel-specs.scm’.  But that’s a detail. :-)

This command create an inferior at commit fixed by ’channel-specs.scm’
and in this inferior, it runs ’manifest.scm’.

The file ’manifest.scm’ creates another inferior at commit d81fb2a to
build “r-foreign” and then build “r” in the current inferior (the one
specified by ’channel-specs.scm’).

By “chance”, the file ’channel-specs.scm’ and ’manifest.scm’ points to
the same commit.  However, the inferior in ’manifest.scm’ is not
necessary.  And even, from my point of view, it is a bad idea.

Inferiors in ’manifest.scm’ are used when you want to put some packages
from different Guix commits in the same profile.  And it is not what you
want here; if I understand correctly your problem.


All the best,
simon


  reply	other threads:[~2021-01-20 10:20 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 [this message]
2021-01-20 12:26                     ` Wiktor Żelazny
2021-01-20 15:03                       ` zimoun
2021-01-22 11:36                         ` Wiktor Żelazny
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

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

  git send-email \
    --in-reply-to=86czxz9aoa.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=wz@freeshell.de \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.