unofficial mirror of help-guix@gnu.org 
 help / color / Atom feed
* Install older version of a package with the "@version" specifier
@ 2020-06-26 16:07 Lo Peter
  2020-06-26 17:14 ` Julien Lepiller
  0 siblings, 1 reply; 4+ messages in thread
From: Lo Peter @ 2020-06-26 16:07 UTC (permalink / raw)
  To: help-guix

Dear all,

I am trying to install r version 3.6.3, where the current version is at 4.0.2.

Accordingly to the manual at
https://guix.gnu.org/manual/en/html_node/Invoking-guix-package.html it
should be possible to specify the package version such as "guix
package -i r@3.6.2", but on my guix (installed on slackware 14.2), it
says:
guix package: error: r: package not found for version 3.6.2

What am I missing here?

Regards,
Peter


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Install older version of a package with the "@version" specifier
  2020-06-26 16:07 Install older version of a package with the "@version" specifier Lo Peter
@ 2020-06-26 17:14 ` Julien Lepiller
  2020-06-26 18:04   ` zimoun
  0 siblings, 1 reply; 4+ messages in thread
From: Julien Lepiller @ 2020-06-26 17:14 UTC (permalink / raw)
  To: help-guix, Lo Peter

Le 26 juin 2020 12:07:42 GMT-04:00, Lo Peter <peterloleungyau@gmail.com> a écrit :
>Dear all,
>
>I am trying to install r version 3.6.3, where the current version is at
>4.0.2.
>
>Accordingly to the manual at
>https://guix.gnu.org/manual/en/html_node/Invoking-guix-package.html it
>should be possible to specify the package version such as "guix
>package -i r@3.6.2", but on my guix (installed on slackware 14.2), it
>says:
>guix package: error: r: package not found for version 3.6.2
>
>What am I missing here?
>
>Regards,
>Peter

In general, at any point in time, we only keep one version of each packages. Exceptions are pretty rare (gcc, python, …). There two ways to get a version that's different from the one in the current guix:

- use the current guix and apply the recipe to an different version, by using something --with-source=r=r-3.6.3.tar.gz or similar. This is not guaranteed to work, as it applies the build procedure of version 4 to version 3. It uses recent software that are patched for vulnerability though.

- use r from an old revision of guix that had the version you're looking for. This can be done using an "inferior". The package will more likely build (and even have substitutes), but it uses the old version of all its dependencies, which are not necessarily patched for vulnerabilities and may require more space to be stored, as they are not shared with other packages.

HTH!


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Install older version of a package with the "@version" specifier
  2020-06-26 17:14 ` Julien Lepiller
@ 2020-06-26 18:04   ` zimoun
  2020-06-27  6:33     ` Lo Peter
  0 siblings, 1 reply; 4+ messages in thread
From: zimoun @ 2020-06-26 18:04 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: help-guix, Lo Peter

Dear,

On Fri, 26 Jun 2020 at 19:15, Julien Lepiller <julien@lepiller.eu> wrote:

> - use r from an old revision of guix that had the version you're looking for. This can be done using an "inferior". The package will more likely build (and even have substitutes), but it uses the old version of all its dependencies, which are not necessarily patched for vulnerabilities and may require more space to be stored, as they are not shared with other packages.

It is not easy to find the old revision (commit) which owns the
version you are looking for.  In such cases, the Guix Data Service
could help.  For example, this URL lists all the R versions in Guix
over the time:

https://data.guix.gnu.org/repository/1/branch/master/package/r

As you can see, it is rare that 2 versions of R exist at the same time
in Guix.  I let you click and you will find that the last commit
containing the R version 3.6.3 is the commit 899093.

https://data.guix.gnu.org/revision/89909327d017198969436237acc7c93823ff8147/package/r/3.6.3

Then the way for creating an inferior is "guix time-machine".  It goes
back but without polluting your current setup; you can have different
versions from different time/commit.  The following command creates
temporarily an old Guix version and use it for spawning an environment
containing R.

--8<---------------cut here---------------start------------->8---
$ guix time-machine --commit=899093      \
     -- environment --ad-hoc r-minimal \
     -- R
R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
[...]
> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-unknown-linux-gnu (64-bit)
Running under: Debian GNU/Linux 10 (buster)

Matrix products: default
BLAS/LAPACK: /gnu/store/vax1vsg3ivf0r7j7n2xkbi1z3r0504l9-openblas-0.3.7/lib/libopenblasp-r0.3.7.so

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_3.6.3
>
--8<---------------cut here---------------end--------------->8---

Instead of 'environment', you can use 'install -p
/path/to/profile/with/old/R'.  However, it is important to be clear
with which version of R you are using and which version is used to
"compile" the R packages you will install, and use a manifest.scm file
is really a good practise when traveling in time. :-)


Hope that helps,
simon


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Install older version of a package with the "@version" specifier
  2020-06-26 18:04   ` zimoun
@ 2020-06-27  6:33     ` Lo Peter
  0 siblings, 0 replies; 4+ messages in thread
From: Lo Peter @ 2020-06-27  6:33 UTC (permalink / raw)
  To: zimoun; +Cc: help-guix

Thanks a lot for the clarifications.

On Sat, Jun 27, 2020 at 2:04 AM zimoun <zimon.toutoune@gmail.com> wrote:
>
> Dear,
>
> On Fri, 26 Jun 2020 at 19:15, Julien Lepiller <julien@lepiller.eu> wrote:
>
> > - use r from an old revision of guix that had the version you're looking for. This can be done using an "inferior". The package will more likely build (and even have substitutes), but it uses the old version of all its dependencies, which are not necessarily patched for vulnerabilities and may require more space to be stored, as they are not shared with other packages.
>
> It is not easy to find the old revision (commit) which owns the
> version you are looking for.  In such cases, the Guix Data Service
> could help.  For example, this URL lists all the R versions in Guix
> over the time:
>
> https://data.guix.gnu.org/repository/1/branch/master/package/r
>
> As you can see, it is rare that 2 versions of R exist at the same time
> in Guix.  I let you click and you will find that the last commit
> containing the R version 3.6.3 is the commit 899093.
>
> https://data.guix.gnu.org/revision/89909327d017198969436237acc7c93823ff8147/package/r/3.6.3
>
> Then the way for creating an inferior is "guix time-machine".  It goes
> back but without polluting your current setup; you can have different
> versions from different time/commit.  The following command creates
> temporarily an old Guix version and use it for spawning an environment
> containing R.
>
> --8<---------------cut here---------------start------------->8---
> $ guix time-machine --commit=899093      \
>      -- environment --ad-hoc r-minimal \
>      -- R
> R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
> [...]
> > sessionInfo()
> R version 3.6.3 (2020-02-29)
> Platform: x86_64-unknown-linux-gnu (64-bit)
> Running under: Debian GNU/Linux 10 (buster)
>
> Matrix products: default
> BLAS/LAPACK: /gnu/store/vax1vsg3ivf0r7j7n2xkbi1z3r0504l9-openblas-0.3.7/lib/libopenblasp-r0.3.7.so
>
> locale:
> [1] C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> loaded via a namespace (and not attached):
> [1] compiler_3.6.3
> >
> --8<---------------cut here---------------end--------------->8---
>
> Instead of 'environment', you can use 'install -p
> /path/to/profile/with/old/R'.  However, it is important to be clear
> with which version of R you are using and which version is used to
> "compile" the R packages you will install, and use a manifest.scm file
> is really a good practise when traveling in time. :-)
>
>
> Hope that helps,
> simon


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-26 16:07 Install older version of a package with the "@version" specifier Lo Peter
2020-06-26 17:14 ` Julien Lepiller
2020-06-26 18:04   ` zimoun
2020-06-27  6:33     ` Lo Peter

unofficial mirror of help-guix@gnu.org 

Archives are clonable:
	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git