Skip to content

"spack buildcache list" prints the same spec multiple times #13757

@alalazo

Description

@alalazo

When using more than one constraint to list specs in a binary mirror, spack buildcache list shows the same spec multiple times base on the number of constraints it satisfies.

Steps to reproduce the issue

Create a binary mirror with at least one package, for instance:

$ spack buildcache list
==> Finding buildcaches in /home/culpo/.mirror/build_cache
==> Finding buildcaches in /home/culpo/production/spack/binary-mirror/build_cache
==> Finding buildcaches in /home/culpo/production/spack/mirror/build_cache
-- linux-ubuntu18.04-broadwell / [email protected] ----------------------
[email protected]

-- linux-ubuntu18.04-x86_64 / [email protected] -------------------------
[email protected]

Then try to use more than on matching constraint:

$ spack buildcache list -l zlib @1.2.11 
==> Finding buildcaches in /home/culpo/.mirror/build_cache
==> Finding buildcaches in /home/culpo/production/spack/binary-mirror/build_cache
==> Finding buildcaches in /home/culpo/production/spack/mirror/build_cache
-- linux-ubuntu18.04-broadwell / [email protected] ----------------------
os3djb5 [email protected]  os3djb5 [email protected]

-- linux-ubuntu18.04-x86_64 / [email protected] -------------------------
tn4qvs7 [email protected]  tn4qvs7 [email protected]

As the output above shows the same spec is displayed twice.

Error Message

No error message, just wrong output displayed to tty.

Information on your system

Not relevant.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions