all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
To: zimoun <zimon.toutoune@gmail.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: How to install previous versions?
Date: Sat, 10 Oct 2020 17:14:45 +0200	[thread overview]
Message-ID: <cefb9e15-d763-9b89-6a8e-5d458d18942b@posteo.de> (raw)
In-Reply-To: <CAJ3okZ0jMJUk_Xe-M6J6LtWudzca+zxGDTis=6QDZ-7aG+YUWQ@mail.gmail.com>

Hello Zimoun!

Thank you for your reply! I have a few follow up questions.

On 10/9/20 6:37 PM, zimoun wrote:
> Hi,
>
> On Fri, 9 Oct 2020 at 19:19, Zelphir Kaltstahl
> <zelphirkaltstahl@posteo.de> wrote:
>
>> http://data.guix.gnu.org/repository/1/branch/master/package/python-redis.
> On this web page, you can click on the date: first commit and last
> commit known to have this version.  You can even see the status
> (build, failed, pending, etc.) on this web page (appending
> 'output-history')
>
> http://data.guix.gnu.org/repository/1/branch/master/package/python-redis/output-history

So far so good, I get until this point.


> For example, clicking leads to:
>
> http://data.guix.gnu.org/revision/f5111b4d2b982d58387188bc3018e4dd2e9a9d4f

Here is where I am lost. Where do I need to click?

I see a link named
`/gnu/store/wlj2bq4g9ki9iz6vqlv366c0v5qmszg7-python-redis-3.3.8`, which
seems to be the latest of the python-redis 3.3.8 version, but that one
leads me elsewhere, leads me to
`http://data.guix.gnu.org/gnu/store/wlj2bq4g9ki9iz6vqlv366c0v5qmszg7-python-redis-3.3.8`.

> And this gives you the commit with 'python-redis@3.8', using the command:
>
>   guix time-machine --commit=f5111b \
>          -- environment --ad-hoc python-redis python \
>          -- python

OK, assume I get the commit id.

I just tried this with the following command:

~~~~
guix time-machine --commit=f5111b -- environment --ad-hoc 'python-redis@3.3.8' 'python@3.8' -- python3.8
~~~~

That runs for a quite while and then I get:

~~~~
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
guile: warning: failed to install locale
guix environment: error: python: package not found for version 3.8.2
~~~~

My guess is, that in this commit of Guix there was no Python 3.8.2 yet?
Or perhaps `python-redis` was not build for that Python version?

I do not have a specific use-case at this moment, but I would like to
know how to get those specific versions, the same every single time I
run the command. To compare, when I create a virtual environment using:

~~~~
python3 -m venv venv
source venv/bin/activate
pip install --requirement requirements.txt
~~~~

I can write the version of python-redis in my requirements.txt file and
it will install just fine. That means, that is it compatible, so it's
not a compatibility issue of python@3.8.2 and python-redis@3.3.8.
However, those virtual environments are not reproducible, as there are
no hashes stored or anything and everything relies on version numbers
only. If anyone changed the code behind a version number, it would
install different code. It would be cooler to have it in Guix and
reproducible.

>> So how would I need to write my manifest.scm or my one-liner to get back
>> to that older version?
> The best is to write a manifest file, say manifest.scm containing the
> package you need:
>
> --8<---------------cut here---------------start------------->8---
> (specfications->manifest
>   (list
>    "python-redis"
>    "python"
>    "foo"
>    "bar"
>    "etc"))
> --8<---------------cut here---------------end--------------->8---
But that is, what I already have, isn't it? There is no part in this,
that indicates `guix time-machine`. If time-machine is necessary to get
the older version of python-redis@3.3.8 in the command line, then there
must be something I need to write in the manifest.scm file to let Guix
know, that I want a specific commit id. Or perhaps this is not possible
with a manifest? Or is the idea, that I need to have a tracked channel
as well to achieve it?
> The other no-so-said is to track "guix describe", you *should* _track_
> the file channels.scm:
>
>    guix describe -f channels.scm
OK this is probably the part, where I need to read the docs about it. I
do not have a channels.scm and I do not know what does in there. I only
have a vague idea about channels in my head.
>
> Then later or on another machine, you simply run the command:
>
>    guix time-machine -C path/to/channels.scm \
>           -- <subcommand> -m path/to/manifest.scm <options>
If I understand this correctly, a manifest with specific versions can
only be guaranteed to work, if I track a channel as well. And somehow in
that channel definition, I must specify which commit of Guix I am on?
But wouldn't that limit my choice of libraries to what was available in
one commit?
> Hope that helps,
> simon

Thanks for all that info. There are still many things unclear to me, but
I hope to gain an understanding of those as well : )

Best regards,
Zelphir

-- 
repositories: https://notabug.org/ZelphirKaltstahl


  reply	other threads:[~2020-10-10 15:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-09 17:00 How to install previous versions? Zelphir Kaltstahl
2020-10-09 16:37 ` zimoun
2020-10-10 15:14   ` Zelphir Kaltstahl [this message]
2020-10-10 16:44     ` zimoun
2020-10-12 13:58       ` Zelphir Kaltstahl
2020-10-12 14: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=cefb9e15-d763-9b89-6a8e-5d458d18942b@posteo.de \
    --to=zelphirkaltstahl@posteo.de \
    --cc=help-guix@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /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.