[libvirt] [jenkins-ci PATCH 5/5] lcitool: Make Dockerfile generation work on openSUSE

Andrea Bolognani abologna at redhat.com
Thu Dec 12 15:02:24 UTC 2019


On Thu, 2019-12-12 at 15:39 +0100, Fabiano Fidêncio wrote:
> > +            # openSUSE doesn't seem to have a convenient way to remove all
> > +            # unnecessary packages, but CentOS and Fedora do
> > +            if os_name == "OpenSUSE":
> > +                commands.extend([
> > +                    "{package_manager} clean --all",
> > +                ])
> > +            else:
> > +                commands.extend([
> > +                    "{package_manager} autoremove -y",
> > +                    "{package_manager} clean all -y",
> > +                ])
> > +
> 
> IMHO, it'd be easier to follow / cleaner if we do:
>   if os_name != "OpenSUSE:"
>       commands.extend([
>           "{package_manager} autoremove -y",
>        ])
> 
> And then, later on ...
>   commands.extend([
>       "{package_manager} clean all -y",
>   ])

Nope, that wouldn't work: the subcommand is

  clean --all

on openSUSE and

  clean all -y

everywhere else, soo there's no part that's common.

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list