Skip to content

Commit

Permalink
Excludes now work
Browse files Browse the repository at this point in the history
  • Loading branch information
rhoneyager-tomorrow committed Aug 22, 2024
1 parent a911915 commit 5e0524b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/spack/spack/environment/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ def regenerate(self, concrete_roots: List[Spec]) -> None:
else:
withdeps = False

view.add_specs(*specs, with_dependencies=withdeps)
view.add_specs(*specs, with_dependencies=withdeps, exclude=self.exclude)

# create symlink from tmp_symlink_name to new_root
if os.path.exists(tmp_symlink_name):
Expand Down
3 changes: 3 additions & 0 deletions lib/spack/spack/filesystem_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,9 @@ def add_specs(self, *specs: spack.spec.Spec, **kwargs) -> None:
if kwargs.get("with_dependencies", True):
specs.update(get_dependencies(specs))

if kwargs.get("exclude", None):
specs = set(filter_exclude(specs, kwargs["exclude"]))

# Drop externals
specs = [s for s in specs if not s.external]

Expand Down

0 comments on commit 5e0524b

Please sign in to comment.