diff options
author | simonLeary42 <71396965+simonLeary42@users.noreply.github.com> | 2023-08-08 08:36:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-08 14:36:49 +0200 |
commit | 6576655137b847af102ebcea20278a6d4f9f09e7 (patch) | |
tree | 62e47d11805ce5b22b3adb131b0980ec57e74719 /lib | |
parent | feb26efecd21239f5eb05131283318bb3d5ad0d2 (diff) | |
download | spack-6576655137b847af102ebcea20278a6d4f9f09e7.tar.gz spack-6576655137b847af102ebcea20278a6d4f9f09e7.tar.bz2 spack-6576655137b847af102ebcea20278a6d4f9f09e7.tar.xz spack-6576655137b847af102ebcea20278a6d4f9f09e7.zip |
Name clash error message include hash of clashing packages (#39234)
Co-authored-by: Simon <simonleary@umass.edu>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/modules/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/modules/__init__.py b/lib/spack/spack/cmd/modules/__init__.py index 1fb50f291d..36e2760ce9 100644 --- a/lib/spack/spack/cmd/modules/__init__.py +++ b/lib/spack/spack/cmd/modules/__init__.py @@ -321,12 +321,13 @@ def refresh(module_type, specs, args): file2writer[item.layout.filename].append(item) if len(file2writer) != len(writers): + spec_fmt_str = "{name}@={version}%{compiler}/{hash:7} {variants} arch={arch}" message = "Name clashes detected in module files:\n" for filename, writer_list in file2writer.items(): if len(writer_list) > 1: message += "\nfile: {0}\n".format(filename) for x in writer_list: - message += "spec: {0}\n".format(x.spec.format()) + message += "spec: {0}\n".format(x.spec.format(spec_fmt_str)) tty.error(message) tty.error("Operation aborted") raise SystemExit(1) |