fix bug with transitive splice with dependency virtuals

This commit is contained in:
Gregory Becker 2024-07-10 14:20:51 -07:00
parent e59901d1f4
commit 43c8bb9fa3

View File

@ -4187,9 +4187,19 @@ def splice(self, other, transitive):
for v in other.package.virtuals_provided
if v in self or v in self.package.virtuals_provided
]
if transitive:
virtuals_to_replace.extend([
v.name
for od in other.traverse(root=False)
for v in od.package.virtuals_provided
if v in self or v in self.package.virtuals_provided
])
if virtuals_to_replace:
deps_to_replace = dict((self[v], other) for v in virtuals_to_replace)
deps_to_replace = {
self[v]: (other[v] if v in other else other)
for v in virtuals_to_replace
}
# deps_to_replace = [self[v] for v in virtuals_to_replace]
else:
# TODO: sanity check and error raise here for other.name not in self