Add missing info to diagnostic for circular provides (#32027)

This commit is contained in:
Chris Green 2022-08-11 07:20:17 -05:00 committed by GitHub
parent 76d8376fea
commit 46c8962e91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -513,7 +513,7 @@ def _execute_provides(pkg):
for string in specs: for string in specs:
for provided_spec in spack.spec.parse(string): for provided_spec in spack.spec.parse(string):
if pkg.name == provided_spec.name: if pkg.name == provided_spec.name:
raise CircularReferenceError("Package '%s' cannot provide itself.") raise CircularReferenceError("Package '%s' cannot provide itself." % pkg.name)
if provided_spec not in pkg.provided: if provided_spec not in pkg.provided:
pkg.provided[provided_spec] = set() pkg.provided[provided_spec] = set()