bugfix: uninstall should find concrete specs by DAG hash (#13598)
This fixes a regression introduced in #10792. `spack uninstall` in an environment would not match concrete query specs properly after the index hash of enviroments changed. - [x] Search by DAG hash for specs to remove instead of by build hash
This commit is contained in:
		| @@ -833,8 +833,16 @@ def remove(self, query_spec, list_name=user_speclist_name, force=False): | |||||||
|  |  | ||||||
|         if not matches: |         if not matches: | ||||||
|             # concrete specs match against concrete specs in the env |             # concrete specs match against concrete specs in the env | ||||||
|  |             # by *dag hash*, not build hash. | ||||||
|  |             dag_hashes_in_order = [ | ||||||
|  |                 self.specs_by_hash[build_hash].dag_hash() | ||||||
|  |                 for build_hash in self.concretized_order | ||||||
|  |             ] | ||||||
|  |  | ||||||
|             specs_hashes = zip( |             specs_hashes = zip( | ||||||
|                 self.concretized_user_specs, self.concretized_order) |                 self.concretized_user_specs, dag_hashes_in_order | ||||||
|  |             ) | ||||||
|  |  | ||||||
|             matches = [ |             matches = [ | ||||||
|                 s for s, h in specs_hashes |                 s for s, h in specs_hashes | ||||||
|                 if query_spec.dag_hash() == h |                 if query_spec.dag_hash() == h | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Todd Gamblin
					Todd Gamblin