bugfix: don't look up patches from packages for concrete specs
The concretizer can fail with `reuse:true` if a buildcache or installation contains a package with a dependency that has been renamed or deleted in the main repo (e.g., `netcdf` was refactored to `netcdf-c`, `netcdf-fortran`, etc., but there are still binary packages with dependencies called `netcdf`). We should still be able to install things for which we are missing `package.py` files. `Spec.inject_patches_variant()` was failing this requirement by attempting to look up the package class for concrete specs. This isn't needed -- we can skip it. - [x] swap two conditions in `Spec.inject_patches_variant()`
This commit is contained in:
parent
f94ac8c770
commit
0458de18de
1 changed files with 3 additions and 3 deletions
|
@ -2789,11 +2789,11 @@ def inject_patches_variant(root):
|
||||||
# Also record all patches required on dependencies by
|
# Also record all patches required on dependencies by
|
||||||
# depends_on(..., patch=...)
|
# depends_on(..., patch=...)
|
||||||
for dspec in root.traverse_edges(deptype=all, cover="edges", root=False):
|
for dspec in root.traverse_edges(deptype=all, cover="edges", root=False):
|
||||||
pkg_deps = dspec.parent.package_class.dependencies
|
if dspec.spec.concrete:
|
||||||
if dspec.spec.name not in pkg_deps:
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if dspec.spec.concrete:
|
pkg_deps = dspec.parent.package_class.dependencies
|
||||||
|
if dspec.spec.name not in pkg_deps:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
patches = []
|
patches = []
|
||||||
|
|
Loading…
Reference in a new issue