Re: [jenkins-ci PATCH v4 3/5] lcitool: avoid intermediate list of packages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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é <berrange@xxxxxxxxxx>
> ---
>  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 <abologna@xxxxxxxxxx>

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux