wrap generator with collection to avoid exhausting it with single iteration (#5586)

This commit is contained in:
scheibelp 2017-10-03 16:47:07 -07:00 committed by becker33
parent ed656dccf5
commit f53be46186

View file

@ -191,9 +191,9 @@ def set_build_environment_variables(pkg, env, dirty):
dirty (bool): Skip unsetting the user's environment settings dirty (bool): Skip unsetting the user's environment settings
""" """
# Gather information about various types of dependencies # Gather information about various types of dependencies
build_deps = pkg.spec.dependencies(deptype=('build', 'test')) build_deps = set(pkg.spec.dependencies(deptype=('build', 'test')))
link_deps = pkg.spec.traverse(root=False, deptype=('link')) link_deps = set(pkg.spec.traverse(root=False, deptype=('link')))
build_link_deps = list(build_deps) + list(link_deps) build_link_deps = build_deps | link_deps
rpath_deps = get_rpath_deps(pkg) rpath_deps = get_rpath_deps(pkg)
build_prefixes = [dep.prefix for dep in build_deps] build_prefixes = [dep.prefix for dep in build_deps]