!8 [sync] PR-6: 修复卸载软件包时报错删除文件不存在

From: @openeuler-sync-bot 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
This commit is contained in:
openeuler-ci-bot 2022-03-17 01:18:05 +00:00 committed by Gitee
commit f8a66e8819
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,6 +1,6 @@
Name: ovirt-cockpit-sso
Version: 0.1.4
Release: 1
Release: 2
Summary: Provides SSO from oVirt Administration Portal to Cockpit
License: ASL 2.0
URL: https://github.com/oVirt/%{name}
@ -74,8 +74,12 @@ esac
case "$1" in
0)
## package is being removed
rm %{app_root_dir}/config/cockpit/ws-certs.d || true
rm %{app_root_dir}/ca.pem || true
if [[ -e %{app_root_dir}/config/cockpit/ws-certs.d ]]; then
rm %{app_root_dir}/config/cockpit/ws-certs.d || true
fi
if [[ -e %{app_root_dir}/ca.pem ]]; then
rm %{app_root_dir}/ca.pem || true
fi
## TODO: this is not working but would be better approach:
## /bin/firewall-cmd --permanent --zone=public --delete-service=ovirt-cockpit-sso
@ -105,5 +109,8 @@ systemctl daemon-reload
%config %verify(not md5 size mtime) %{app_root_dir}/config/cockpit/cockpit.conf
%changelog
* Wed Mar 16 2022 wangdi <wangdi@kylinos.cn> - 0.1.4-2
- fix warning of failing to delete files when uninstall
* Tue Jul 06 2021 weishaokun <weishaokun@kylinos.cn> - 0.1.4
- update package