From c594bb7119fd70aef8e5792efc672fb4b91059fe Mon Sep 17 00:00:00 2001 From: mgb01105731 Date: Fri, 25 Mar 2022 09:29:27 +0800 Subject: [PATCH] fix module virt --- centos2anolis.py | 3 ++- centos2anolis.spec | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/centos2anolis.py b/centos2anolis.py index ae7e349..f35b9c3 100644 --- a/centos2anolis.py +++ b/centos2anolis.py @@ -523,7 +523,7 @@ def check_dnf_modules(): unknown_mods = [] if len(enabled_modules) > 0: for mod in enabled_modules: - if re.fullmatch('container-tools|llvm-toolset', mod): + if re.fullmatch('container-tools|llvm-toolset|virt', mod): subprocess.run('dnf module --disablerepo=* reset -y ' + mod, shell=True) if not re.fullmatch('container-tools|go-toolset|jmc|llvm-toolset|rust-toolset|virt', mod): unknown_mods.append(mod) @@ -743,6 +743,7 @@ def reset_yum_cache(): def do_migration(): try: + subprocess.check_call('yum update libdnf -y', shell=True) subprocess.check_call('yum -y distro-sync', shell=True) except: log_it(logging.ERROR, "Could not automatically sync with Anolis OS repositories.\n\ diff --git a/centos2anolis.spec b/centos2anolis.spec index c8bd56e..aeb285b 100644 --- a/centos2anolis.spec +++ b/centos2anolis.spec @@ -1,4 +1,4 @@ -%define anolis_release 3 +%define anolis_release 4 Name: centos2anolis Version: 0.1 @@ -39,6 +39,9 @@ install -m 755 %{SOURCE0} %{buildroot}/%{_sbindir} %changelog +* Fri Mar 25 2022 mgb0110571 - 0.1-4 +- fix module virt + * Fri Feb 11 2022 mgb0110571 - 0.1-3 - Add mysql-server check - handle 3rd-part repository files and try using an internal web address -- Gitee