Re: [libvirt PATCH v3 04/10] ci: Implement 'refresh' helper action

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

 



On Fri, Mar 12, 2021 at 06:28:16PM +0100, Andrea Bolognani wrote:
> This provides the same functionality as the two refresh scripts
> that are currently in the repository, with the following
> advantages:
> 
>   * all files are refreshed with a single command;
> 
>   * if lcitool is present in the user's $PATH, it will be
>     discovered and used automatically;
> 
>   * some output is produced, so the user can follow along with
>     the progress of the operation.
> 
> Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> ---
...

> +        for host in self.lcitool_get_hosts():
> +            if host.startswith("freebsd-") or host.startswith("macos-"):
> +                continue
> +
> +            print(f"containers/{host}")

Not sure whether I like the verbosity ^here, but since I don't have a
compelling argument against, let's keep it. However, in that case I'd expect it
to output the name of the dockerfile verbatim rather than something that
partially looks like a path but really isn't.

> +            self.generate_dockerfile(host)
> +
> +            if host == "fedora-rawhide":
> +                for cross in fedora_cross:
> +                    print(f"containers/{host} ({cross})")

...same here...

> +                    self.generate_dockerfile(host, cross)
> +
> +            if host.startswith("debian-"):
> +                for cross in debian_cross:
> +                    if host == "debian-sid" and cross == "mips":
> +                        continue
> +                    print(f"containers/{host} ({cross})")

...and here...

> +                    self.generate_dockerfile(host, cross)
> +
> +    def refresh_cirrus(self):
> +        for host in self.lcitool_get_hosts():
> +            if not (host.startswith("freebsd-") or host.startswith("macos-")):
> +                continue
> +
> +            print(f"cirrus/{host}")
> +            self.generate_vars(host)
> +
> +    def action_refresh(self):
> +        self.refresh_containers()
> +        self.refresh_cirrus()
> +
>      def run(self):
>          self.args.func(self)
>  
> -- 
> 2.26.2
> 

Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx>




[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