Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
fcc4c1b2
Commit
fcc4c1b2
authored
8 years ago
by
Erik Schnetter
Browse files
Options
Downloads
Patches
Plain Diff
Remove duplicate providers that can concretize to the same result
Patch generously provided by @becker33. Closes #928.
parent
1774c7a7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/spack/spack/spec.py
+5
-0
5 additions, 0 deletions
lib/spack/spack/spec.py
with
5 additions
and
0 deletions
lib/spack/spack/spec.py
+
5
−
0
View file @
fcc4c1b2
...
@@ -1071,6 +1071,11 @@ def _find_provider(self, vdep, provider_index):
...
@@ -1071,6 +1071,11 @@ def _find_provider(self, vdep, provider_index):
# If there is a provider for the vpkg, then use that instead of
# If there is a provider for the vpkg, then use that instead of
# the virtual package.
# the virtual package.
if
providers
:
if
providers
:
# Remove duplicate providers that can concretize to the same result.
for
provider
in
providers
:
for
spec
in
providers
:
if
spec
is
not
provider
and
provider
.
satisfies
(
spec
):
providers
.
remove
(
spec
)
# Can't have multiple providers for the same thing in one spec.
# Can't have multiple providers for the same thing in one spec.
if
len
(
providers
)
>
1
:
if
len
(
providers
)
>
1
:
raise
MultipleProviderError
(
vdep
,
providers
)
raise
MultipleProviderError
(
vdep
,
providers
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment