From 2d12850de0c6af3d547d4c746321ba878fc6f7ec Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Tue, 20 Jul 2021 15:44:46 +0200 Subject: [PATCH 1/2] libpbuild.bash: bugfix in version compare functions --- Pmodules/libpbuild.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pmodules/libpbuild.bash b/Pmodules/libpbuild.bash index 50f5687..35ce306 100644 --- a/Pmodules/libpbuild.bash +++ b/Pmodules/libpbuild.bash @@ -90,7 +90,7 @@ pbuild::version_lt() { pbuild::version_le() { pbuild::version_compare "$1" "$2" local -i exit_code=$? - (( exit_code == 0 || exit_code = 2 )) + (( exit_code == 0 || exit_code == 2 )) } @@ -98,7 +98,7 @@ pbuild::version_gt() { pbuild::version_compare "$1" "$2" (( $? == 1 )) local -i exit_code=$? - (( exit_code == 0 || exit_code = 1 )) + (( exit_code == 0 || exit_code == 1 )) } pbuild::version_eq() { From 4f625ed86b5435eeb942a2367ace9dcd979164e9 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Tue, 20 Jul 2021 15:54:21 +0200 Subject: [PATCH 2/2] libstd.bash: fix in std.get_os_release_linux() for current CentOS --- Pmodules/libstd.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pmodules/libstd.bash b/Pmodules/libstd.bash index e5a2f46..fedd0c4 100644 --- a/Pmodules/libstd.bash +++ b/Pmodules/libstd.bash @@ -220,8 +220,8 @@ std.get_os_release_linux() { fi case "${ID}" in - RedHatEnterpriseServer | RedHatEnterprise | Scientific | rhel | centos | fedora ) - echo "rhel${VERSION_ID%.*}" + RedHatEnterpriseServer | RedHatEnterprise | Scientific | rhel | centos | CentOS | fedora ) + echo "rhel${VERSION_ID%%.*}" ;; Ubuntu ) echo "Ubuntu${VERSION_ID%.*}"