-
Notifications
You must be signed in to change notification settings - Fork 2.4k
checksum does not use url created in url_for #15985
Copy link
Copy link
Closed
Labels
Description
spack checksum does not use the url_for function to look for versions that may be located at different urls
Steps to reproduce the issue
Create test package
from spack.spec import ConflictsInSpecError
yaml_cpp_tests_libcxx_error_msg = 'yaml-cpp tests incompatible with libc++'
class TestPackage(CMakePackage):
"""A YAML parser and emitter in C++"""
homepage = "https://github.com/jbeder/yaml-cpp"
#url = "https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.5.3.tar.gz"
git = "https://github.com/jbeder/yaml-cpp.git"
def url_for_version(self, version):
url = "https://github.com/jbeder/yaml-cpp/archive/{0}-{1}.tar.gz"
if version < Version('0.5.3'):
return url.format('release',version)
else:
return url.format('yaml-cpp',version)$ spack checksum test-package
Error: Could not find any versions for test-packageError Message
$ spack --debug --stacktrace checksum test-package
lib/spack/spack/cmd/__init__.py:102 ==> [2020-04-09-21:17:37.863469, 19046] Imported checksum from built-in commands
lib/spack/spack/cmd/__init__.py:102 ==> [2020-04-09-21:17:37.864401, 19046] Imported checksum from built-in commands
lib/spack/spack/config.py:727 ==> [2020-04-09-21:17:37.866602, 19046] Reading config file /lore/mersoj/spack/spack/etc/spack/defaults/repos.yaml
lib/spack/spack/config.py:727 ==> [2020-04-09-21:17:37.868508, 19046] Reading config file /users/mersoj/.spack/linux/repos.yaml
lib/spack/spack/cmd/checksum.py:56 ==> [2020-04-09-21:17:37.961179, 19046] Error: Could not find any versions for test-package
lib/spack/spack/config.py:727 ==> [2020-04-09-21:17:37.961651, 19046] Reading config file /lore/mersoj/spack/spack/etc/spack/defaults/config.yaml
lib/spack/spack/config.py:727 ==> [2020-04-09-21:17:37.978666, 19046] Reading config file /users/mersoj/.spack/config.yaml
Traceback (most recent call last):
File "/lore/mersoj/spack/spack/lib/spack/spack/main.py", line 763, in main
return _invoke_command(command, parser, args, unknown)
File "/lore/mersoj/spack/spack/lib/spack/spack/main.py", line 488, in _invoke_command
return_val = command(parser, args)
File "/lore/mersoj/spack/spack/lib/spack/spack/cmd/checksum.py", line 56, in checksum
tty.die("Could not find any versions for {0}".format(pkg.name))
File "/lore/mersoj/spack/spack/lib/spack/llnl/util/tty/__init__.py", line 227, in die
sys.exit(1)
SystemExit: 1Information on your system
- Spack: 0.14.1-589-0c0c666
- Python: 2.7.5
- Platform: linux-rhel7-skylake
Additional 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
Reactions are currently unavailable