diff --git a/0045-Fix-bug-with-existing-symlink-in-handleyumconfig.patch b/0045-Fix-bug-with-existing-symlink-in-handleyumconfig.patch new file mode 100644 index 0000000000000000000000000000000000000000..9f621ea9d16ea79cbcbf6dccb5d5b60a5427670d --- /dev/null +++ b/0045-Fix-bug-with-existing-symlink-in-handleyumconfig.patch @@ -0,0 +1,37 @@ +From b9b3830dfeb2626bd936585150aeffb558c37a60 Mon Sep 17 00:00:00 2001 +From: wangcichen +Date: Tue, 16 May 2023 23:20:44 +0800 +Subject: [PATCH] Fix bug with existing symlink in handleyumconfig + +Signed-off-by: wangcichen +--- + repos/system_upgrade/el7toel8/tools/handleyumconfig | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/repos/system_upgrade/el7toel8/tools/handleyumconfig b/repos/system_upgrade/el7toel8/tools/handleyumconfig +index af0bc48..67dc94d 100755 +--- a/repos/system_upgrade/el7toel8/tools/handleyumconfig ++++ b/repos/system_upgrade/el7toel8/tools/handleyumconfig +@@ -10,15 +10,17 @@ is_dir_empty() { + + handle_dir() { + # Move all files from $1 to $2 when the /etc/yum/$1 is not empty ++ # and not already a link + # Then remove the $1 directory and relink it to $2 + # param $1: dirname under /etc/yum path + # param $2: dirname under /etc/dnf path ++ if [ "$(readlink /etc/yum/$1)" == "../dnf/$2" ]; then ++ return ++ fi + if ! is_dir_empty "/etc/yum/$1"; then + mv /etc/yum/$1/* /etc/dnf/$2/ + fi + +- # FIXME: do not care whether these were already symlinks for now +- # just remove it + rm -rf /etc/yum/$1 + + #relink +-- +2.22.0 + diff --git a/leapp-repository.spec b/leapp-repository.spec index fa632b5d8c60295585ca717048498f397f193817..2786e442c109f3942c2c3e4d14404f9b8d180ffc 100644 --- a/leapp-repository.spec +++ b/leapp-repository.spec @@ -11,7 +11,7 @@ }\ py2_byte_compile "%1" "%2"} -%define anolis_release 23 +%define anolis_release 24 Name: leapp-repository Version: 0.13.0 @@ -70,6 +70,7 @@ Patch41: 0041-Add-python-devel-version-check-and-update.patch Patch42: 0042-Report-inhibitor-message-to-SMC.patch Patch43: 0043-Fix-the-memory-unit-error.patch Patch44: 0044-Setup-3rd-repo-available-if-some-pkg-installed-from-.patch +Patch45: 0045-Fix-bug-with-existing-symlink-in-handleyumconfig.patch BuildArch: noarch BuildRequires: python-devel @@ -197,6 +198,9 @@ done; # no files here %changelog +* Thu May 18 2023 Cichen Wang - 0.13.0-2.24 +- Fix bug with existing symlink in handleyumconfig + * Wed May 17 2023 Weitao Zhou - 0.13.0-2.23 - Support nodesource, zabbix 3rd repos migrate