Both orders work and lead to the same results, but performing the steps in this specific order will make further refactoring easier. Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- guests/lcitool | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index d4dc1c8..4c2a04e 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -751,18 +751,18 @@ class Application: elif os_name == "CentOS": if os_version == "7": sys.stdout.write(textwrap.dedent(""" - RUN {package_manager} update -y && \\ - {package_manager} install -y epel-release && \\ + RUN {package_manager} install -y epel-release && \\ + {package_manager} update -y && \\ {package_manager} install -y {pkgs} && \\ {package_manager} autoremove -y && \\ {package_manager} clean all -y """).format(**varmap)) else: sys.stdout.write(textwrap.dedent(""" - RUN {package_manager} update -y && \\ - {package_manager} install 'dnf-command(config-manager)' -y && \\ + RUN {package_manager} install 'dnf-command(config-manager)' -y && \\ {package_manager} config-manager --set-enabled PowerTools -y && \\ {package_manager} install -y epel-release && \\ + {package_manager} update -y && \\ {package_manager} install -y {pkgs} && \\ {package_manager} autoremove -y && \\ {package_manager} clean all -y -- 2.23.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list