spack/lib/spack
Harmen Stoppels 304249604a
Fix prefix-collision detection for projections (#24049)
If two Specs have the same hash (and prefix) but are not equal, Spack
originally had logic to detect this and raise an error (since both
cannot be installed in the same place). Recently this has eroded and
the check no-longer works; moreover, when defining projections (which
may truncate the hash or other distinguishing properties from the
prefix) Spack was also failing to detect collisions (in both of these
cases, Spack would overwrite the old prefix with the new Spec).

This PR maintains a list of all "taken" prefixes: if a hash is not
registered (i.e. recorded as installed in the database) but the prefix
is occupied, that is a collision. This can detect collisions created
by defining projections (specifically when they omit the hash).

The PR does not detect collisions where specs have the same hash
(and prefix) but are not equal.
2021-06-29 14:44:56 -07:00
..
docs docs: link projections docs to spec format (#24478) 2021-06-27 08:38:28 +00:00
env cc: change mode to ccld for loopopt edit (#23482) 2021-05-13 21:31:20 -07:00
external Update archspec to support arm compiler on a64fx (#24524) 2021-06-26 09:18:48 +02:00
llnl Log performance improvement (#23925) 2021-05-31 20:33:14 -07:00
spack Fix prefix-collision detection for projections (#24049) 2021-06-29 14:44:56 -07:00