fix an issue where some variants were not being concatenated correctly (#21174)

This commit is contained in:
Omar Padron 2021-01-20 14:27:41 -05:00 committed by GitHub
parent 6f3027b9fb
commit 43935b4917
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,7 +69,9 @@ def variants2deps(dep_spec, pkg_spec, variants):
state = ['+' if d == '1' else '~' for d in format(i, '0' + str(n) + 'b')] state = ['+' if d == '1' else '~' for d in format(i, '0' + str(n) + 'b')]
[pkg_vars, dep_vars] = [''.join(v) for v in zip( [pkg_vars, dep_vars] = [''.join(v) for v in zip(
*[(s + pv, s + dv) for s, (pv, dv) in zip(state, variants.items())])] *[(s + pv, s + dv) for s, (pv, dv) in zip(state, variants.items())])]
depends_on(dep_spec + dep_vars, when=(pkg_spec + pkg_vars)) dependency = ' '.join((dep_spec, dep_vars))
predicate = ' '.join((pkg_spec, pkg_vars))
depends_on(dependency, when=predicate)
############################################################ ############################################################
# Dependencies # Dependencies