!83 fix 升级时,新版本必须大于旧版本
From: @hengliue Reviewed-by: @zhang_xubo Signed-off-by: @zhang_xubo
This commit is contained in:
commit
ddcd8c5a6a
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
Name: opengauss
|
Name: opengauss
|
||||||
Version: 6.0.0
|
Version: 6.0.0
|
||||||
Release: 21
|
Release: 22
|
||||||
Summary: openGauss is an open source relational database management system
|
Summary: openGauss is an open source relational database management system
|
||||||
License: MulanPSL-2.0 and MIT and BSD and zlib and TCL and Apache-2.0 and BSL-1.0
|
License: MulanPSL-2.0 and MIT and BSD and zlib and TCL and Apache-2.0 and BSL-1.0
|
||||||
URL: https://gitee.com/opengauss/openGauss-server
|
URL: https://gitee.com/opengauss/openGauss-server
|
||||||
@ -309,8 +309,8 @@ if [ $1 -eq 1 ]; then
|
|||||||
elif [ $1 -eq 2 ]; then
|
elif [ $1 -eq 2 ]; then
|
||||||
echo "Preparing for upgrade"
|
echo "Preparing for upgrade"
|
||||||
old_version=$(rpm -qi opengauss | grep -i version | awk -F':' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//')
|
old_version=$(rpm -qi opengauss | grep -i version | awk -F':' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//')
|
||||||
if [ "$(printf '%s\n' "%{version}" "$old_version" | sort -V | head -n1)" == "$old_version" ]; then
|
if [ "$(printf '%s\n' "%{version}" "$old_version" | sort -V | head -n1)" == "%{version}" ]; then
|
||||||
echo "Error: New version (${version}) must be greater than the old version ($old_version)."
|
echo "Error: New version (%{version}) must be greater than the old version ($old_version)."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [[ "${old_version}" == "2.1.0" && %{version} == "6.0.0" ]]; then
|
if [[ "${old_version}" == "2.1.0" && %{version} == "6.0.0" ]]; then
|
||||||
@ -466,6 +466,9 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Dec 14 2024 liuheng <liuheng76@huawei.com> - 6.0.0-22
|
||||||
|
- Fix bugs: when upgrading, the new version cannot be lower than the old version
|
||||||
|
|
||||||
* Sat Dec 14 2024 liuheng <liuheng76@huawei.com> - 6.0.0-21
|
* Sat Dec 14 2024 liuheng <liuheng76@huawei.com> - 6.0.0-21
|
||||||
- Fix different versions of autoconf and resolve exceptions
|
- Fix different versions of autoconf and resolve exceptions
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user