Fix py_pkgs lookup to not include optional packages

This change fixes a regression created when we Updated lookup plugin
to allow it to also index requirement files. The offending change is
here: "I5e981c818a1da50aa0ae15630655a8dfac4f3db7". This simply ensures
that only non-optional packages are part of the specific role
requirements.

Change-Id: I1b65a595d8691fdd38ffd568db71a1bcc06207c9
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2016-07-27 08:29:46 -05:00
parent 211dd9baa1
commit 523afbd014
No known key found for this signature in database
GPG Key ID: 69FEFFC5E2D9273F
1 changed files with 2 additions and 2 deletions

View File

@ -458,8 +458,8 @@ class DependencyFileProcessor(object):
pkgs = role_pkgs.get(var_name, list())
if 'optional' not in var_name:
pkgs.extend(packages)
pkg_index[role_name][var_name] = self._py_pkg_extend(packages, pkgs)
pkgs = self._py_pkg_extend(packages, pkgs)
pkg_index[role_name][var_name] = pkgs
else:
for k, v in pkg_index.items():
for item_name in v.keys():