From 5d195804811209e784b13144223359c2bd7edaa8 Mon Sep 17 00:00:00 2001 From: Hang Zhao Date: Fri, 21 Jul 2023 13:40:56 +0800 Subject: [PATCH] fixup update rpm bug when using "-Uvh" Signed-off-by: Hang Zhao --- rpm/sysak-build-nodep-aarch64.sh | 4 +++- rpm/sysak-build-nodep.sh | 4 +++- rpm/sysak-build.sh | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/rpm/sysak-build-nodep-aarch64.sh b/rpm/sysak-build-nodep-aarch64.sh index 8b740639..f2680985 100755 --- a/rpm/sysak-build-nodep-aarch64.sh +++ b/rpm/sysak-build-nodep-aarch64.sh @@ -57,7 +57,9 @@ if [ \$? -eq 0 ]; then fi %postun -rm -rf /usr/local/sysak +if [ \$1 -eq 0 ]; then + rm -rf /usr/local/sysak +fi %files /etc/sysak diff --git a/rpm/sysak-build-nodep.sh b/rpm/sysak-build-nodep.sh index d43a1852..e194c14e 100755 --- a/rpm/sysak-build-nodep.sh +++ b/rpm/sysak-build-nodep.sh @@ -60,7 +60,9 @@ if [ \$? -eq 0 ]; then fi %postun -rm -rf /usr/local/sysak +if [ \$1 -eq 0 ]; then + rm -rf /usr/local/sysak +fi %files /etc/sysak diff --git a/rpm/sysak-build.sh b/rpm/sysak-build.sh index 81df2bbf..e68b7ed8 100755 --- a/rpm/sysak-build.sh +++ b/rpm/sysak-build.sh @@ -55,7 +55,9 @@ if [ $? -eq 0 ]; then fi %postun -rm -rf /usr/local/sysak +if [ \$1 -eq 0 ]; then + rm -rf /usr/local/sysak +fi %files /usr/local/sysak -- Gitee