qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 2/4] Jobs based on custom runners: build environment docs


From: Andrea Bolognani
Subject: Re: [PATCH v4 2/4] Jobs based on custom runners: build environment docs and playbook
Date: Tue, 10 Nov 2020 18:27:17 +0100
User-agent: Evolution 3.36.5 (3.36.5-1.fc32)

On Mon, 2020-11-09 at 11:37 -0500, Cleber Rosa wrote:
> On Tue, Oct 20, 2020 at 07:52:43PM +0200, Andrea Bolognani wrote:
> > On Sun, 2020-10-18 at 21:50 -0400, Cleber Rosa wrote:
> > > +    - name: Install basic packages to build QEMU on FreeBSD 12.x
> > > +      pkgng:
> > > +        # Originally from packages on .cirrus.yml under the 
> > > freebsd_12_task
> > > +        name: 
> > > bash,curl,cyrus-sasl,git,glib,gmake,gnutls,gsed,nettle,ninja,perl5,pixman,pkgconf,png,usbredir
> > 
> > See above for 'pkgng' vs 'package', but at the very least this should
> > be
> > 
> >   pkgng:
> >     name:
> >       - bash
> >       - curl
> >         ...
> > 
> > or each time the list is touched the resulting diff is going to be
> > unmanageable.
> 
> The documentation suggests a comma separated list of package names:
> 
>    https://docs.ansible.com/ansible/2.8/modules/pkgng_module.html#pkgng-module
> 
> And the reason is that this module is not as smart as others, and will
> run one separate command for each individual package name value:
> 
>    
> https://github.com/ansible/ansible/blob/v2.10.3/test/support/integration/plugins/modules/pkgng.py#L214
> 
> It's a tradeoff indeed, but I think we're aligned with the docs.

I would probably take the performance hit over having to deal with an
unmaintainable blob. As a rule of thumb, reviewer time is more
valuable than machine time.

If the performance hit turns out to be unacceptably big, you could at
least do something along the lines of

  - set_fact:
      freebsd_packages:
        - bash
        - curl
          ...
  
  - pkgng:
      name: "{ freebsd_packages | join(',') }"

to keep things reviewable.

-- 
Andrea Bolognani / Red Hat / Virtualization




reply via email to

[Prev in Thread] Current Thread [Next in Thread]