spack: Wrong source url for older versions of R-packages
Steps to reproduce
When there is a newer version of an R-package published on cran, fetching the older versions does not work in spack anymore.
e.g. r-ellipsis
- newest version in spack is 0.3.1 (before #26965 is merged)
- newest version on cran 0.3.2
- running
spack checksum r-ellipsis@0.3.1fails with the error message
» spack checksum r-ellipsis@0.3.1
==> Found 1 version of r-ellipsis:
0.3.1 https://cloud.r-project.org/src/contrib/ellipsis_0.3.1.tar.gz
==> Something failed on https://cloud.r-project.org/src/contrib/ellipsis_0.3.1.tar.gz, skipping. (All fetchers failed for spack-stage-z032nuxl)
==> Error: Could not fetch any versions for r-ellipsis
but spack checksum r-ellipsis@0.3.2 works.
Also spack install r-ellipsis0.3.1 works, because it fetches the sources from the spack mirror and not from cran.
Reason:
spack tries to get the sources from https://cloud.r-project.org/src/contrib/ellipsis_0.3.1.tar.gz but https://cloud.r-project.org/src/contrib only provides the newest version (here 0.3.2), older versions are migrated to https://cloud.r-project.org/src/contrib/Archive/ellipsis. Thus spack checksum fails for old versions of the package (I checked all old versions in spack: 0.3.1, 0.3.0, 0.2.0.1).
I tried to migrate to using the cran attribute instead of explicit url and list_url but that does not change anything.
All R-packages I tested had this problem regarding older versions, e.g.
r-rcpp@1.0.6,r-broom@0.3.1r-lifecycle@0.2.0r-lme4@1.1-27
ping @glennpj as R maintainer
Error message
No response
Information on your system
- Spack: 0.16.3-5036-7884fc8973
- Python: 3.8.10
- Platform: linux-fedora32-haswell
- Concretizer: clingo
General information
- I have run
spack debug reportand reported the version of Spack/Python/Platform - I have searched the issues of this repo and believe this is not a duplicate
- I have run the failing commands in debug mode and reported the output
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (17 by maintainers)
To be honest, I am not sure that
spack checksum ...with a version fromlist_urlworked recently. So there may be two problems here.To be complete, I replaced the
cranattribute with expliciturlandlist_urlparameters and see the same behavior as with thecranattribute. That pretty much confirms that this is not anrproblem but achecksumproblem.I can confirm that backing out #25831 fixes the case where a version is not specified on the command line.
but not when a version is given on the command line.
No, this used to work. The fix is to ensure that
list_urlis considered as well asurl. Also, it is important to note that this is not anrproblem. Other packages that uselist_urlwould also be affected.To echo what @bernhardkaindl says above, there is also a problem when a version is specified on the command line.
That also triggers using only
urland notlist_url.I am trying to catch up on things but will take a look.