On Thu, 2019-02-21 at 16:33 +0000, Daniel P. Berrangé wrote:
> We can purge any packages which expand to None straight away, and
> simply convert to a set to get rid of duplicates.
>
> Signed-off-by: Daniel P. Berrangé <[email protected]>
> ---
> guests/lcitool | 17 +++++------------
> 1 file changed, 5 insertions(+), 12 deletions(-)
This doesn't work:
$ ./lcitool dockerfile libvirt-centos-7 libvirt
Traceback (most recent call last):
File "./lcitool", line 601, in <module>
Application().run()
File "./lcitool", line 596, in run
args.func(args)
File "./lcitool", line 560, in _action_dockerfile
if pkgs[package] is None:
KeyError: 'apparmor'
That's because...
> @@ -557,21 +556,15 @@ class Application:
> for package in self._projects.get_packages(project):
> for key in keys:
> if key in mappings[package]:
> - temp[package] = mappings[package][key]
> + pkgs[package] = mappings[package][key]
... the hunk
if package not in pkgs:
continue
from the following patch should have been included right about here.
It would be nice if the Ansible part would be converted to a similar
logic, which should be possible using the appropriate Jinja2 filters,
but that can wait until later.
If you include the hunk mentioned above,
Reviewed-by: Andrea Bolognani <[email protected]>
--
Andrea Bolognani / Red Hat / Virtualization
--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list