Skip to content

spack setup does not work for packages without a url field #15575

@germasch

Description

@germasch

Spack version

$ spack --version
0.14.0-279-7a1fc75

Steps to reproduce the issue

$ EXPORT SPACK_DEPENDENCIES=""
$ spack setup xdmf3@local

The first line is needed to work around another issue (#10715), which is unrelated. xdmf3 is an arbitrary choice of package -- any CMakePackage that does not specify a url (but a git repo) will show the problem.

Error Message

==> Warning: Missing a source id for xdmf3@local
==> Warning: Missing a source id for [email protected]
==> Error: Can't extrapolate a URL for version local because package xdmf3 defines no URLs

What I think happens is that Spack is trying to find a tarball for the version local, but doesn't know where to look. If the package.py specifies a url, it'll look for an appropriately named tarball there, but proceeds anyway if it cannot find one, which is expected behavior (I believe). However, if there is no url to try, it fails as seen above.

The problem can be worked around by adding a fake url to the package.py. It only affects spack setup -- spack install works fine (because there one uses a valid version).

Information on your system

Summit or Ubuntu 18.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageThe issue needs to be prioritized

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions