On Tue, 2019-10-08 at 09:58 +0200, Fabiano Fidêncio wrote: > +++ b/guests/lcitool > pkg_align = " \\\n" + (" " * len("RUN " + package_manager + " ")) > + pip_pkg_align = " \\\n" + (" " * len("RUN pip3 install ")) s/pip3 install /pip3 / > + if pip_pkgs: > + sys.stdout.write(textwrap.dedent(""" > + RUN pip3 install {pip_pkgs} > + """).format(**varmap)) > + For cross Dockerfiles, this results in ENV directives being generated in between RUN directives, which is kinda messy. Please shuffle stuff around so that you avoid that. > +++ b/guests/playbooks/update/tasks/packages.yml > +- name: '{{ project }}: Verify pip mappings' > + fail: > + msg: 'No mappings defined for {{ item }}' > + with_items: > + '{{ packages }}' > + when: > + - pip_mappings[item] is undefined and mappings[item] is undefined This can be just when: - pip_mappings[item] is undefined since we checked the other part earlier. > +- set_fact: > + pip_executable: pip3 You use this only once... No need to define a fact for it. > +- name: '{{ project }}: Install packages from pip' > + pip: > + name: '{{ pip_temp[item] }}' > + executable: '{{ pip_executable }}' > + state: '{{ state }}' > + with_items: > + '{{ packages }}' > + when: > + - temp[item] is defined > + - temp[item] == None > + - pip_temp[item] is defined > + - pip_temp[item] != None I would flatten and sort the list before acting on it, same as we do for native packages. > +++ b/guests/vars/mappings.yml > +pip_mappings: > + > + meson: > + default: meson==0.49.0 Please add a comment explaining how these mappings differ from the native ones. -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list