[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: zimoun
Subject: Re: guix time-machine, broken hash in an old package definition, a workaround?
Date: Wed, 20 Jan 2021 16:03:09 +0100


On Wed, 20 Jan 2021 at 13:26, Wiktor Żelazny <> wrote:
> On Wed, Jan 20, 2021 at 11:15:17AM +0100, zimoun wrote:

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

> Thanks for the review. You could say the same thing about Software
> Heritage. You never know. I was considering starting a new thread

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

The current issue with Software Heritage is that the tarballs story is
not ready yet.  Roughly speaking, now it is not possible to fallback
to SWH for tarballs.

> > 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. :-)
> Thanks. I thought that --channels referred to the package definitions,
> whereas --commit to the guix version that processes them (yes, I know
> that the definitions are a part of guix, but still).

I do not know if there is a precedence and what happens if the file
passed to the --channels option provides a commit and in the same time
--commit provides another commit.

> Does `environment -C` imply `environment --pure`, as well?

--pure simply clear all the environment variables.
--container runs a fresh container, i.e., nothing inherited.

> > By “chance”, the file ’channel-specs.scm’ and ’manifest.scm’ points to
> > the same commit.
> This is intentional. I want to have an environment reflecting the
> d81fb2a state of things, so that’s why I’m consistent with the commit.

My point is the inferior done by your manifest is not necessary for that.
Somehow, you are running this:

  guix time-machine --commit=d81fb2a \
          -- time-machine --commit=d81fb2a \
          -- build r-foreign@fixed

This command line is almost equivalent to the inferior in your manifest file.

> > However, the inferior in ’manifest.scm’ is not necessary.
> Why? If it’s not there, you’re facing the hash mismatch problem, aren’t
> you? Please, explain.

No.  Because you need to build 'r-foreign@fixed' and not 'r-foreign'

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")
              (method url-fetch)


$ guix time-machine --commit=d81fb2a \
           -- environment -m manifest.scm
--8<---------------cut here---------------end--------------->8---

(As previously shown in this thread.)

> > 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.
> If a tool designed for some purpose turns out to be suitable for other
> purposes, as well, I see no reason for not using it for latter. It’s a
> bit like Unix philosophy.

Obviously!  You can shot in your foot, too. :-)

My comment is to explain that your use of "inferior" is far to be
optimal and not necessary to solve your problem.

> It works for me. If there are better solutions, I’ll be happy to learn.

For example, see here

All the best,

reply via email to

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