all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: help-guix <help-guix@gnu.org>, zimoun <zimon.toutoune@gmail.com>
Subject: Re: guix time-machine, broken hash in an old package definition, a workaround?
Date: Wed, 20 Jan 2021 16:03:09 +0100	[thread overview]
Message-ID: <CAJ3okZ1HBJK0-9VneqibEMpDN-6kpcJBVU-PvBXm6qy7=BPLUw@mail.gmail.com> (raw)
In-Reply-To: <20210120122602.la6nckvozvdkwfnh@wzguix>

Hi,

On Wed, 20 Jan 2021 at 13:26, Wiktor Żelazny <wz@freeshell.de> 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")
           (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---

(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
<https://lists.gnu.org/archive/html/help-guix/2021-01/msg00108.html>


All the best,
simon


  reply	other threads:[~2021-01-20 15:03 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 [this message]
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='CAJ3okZ1HBJK0-9VneqibEMpDN-6kpcJBVU-PvBXm6qy7=BPLUw@mail.gmail.com' \
    --to=zimon.toutoune@gmail.com \
    --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.
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.