From c4d4f2e42a816d4730fb016e4fe53aef804a4558 Mon Sep 17 00:00:00 2001 From: liujiangbin11 Date: Wed, 12 Mar 2025 11:25:14 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20oedp=20=E6=94=AF=E6=8C=81=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E5=AE=89=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oedp/build/oedp.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/oedp/build/oedp.spec b/oedp/build/oedp.spec index 456c72c..e04043a 100644 --- a/oedp/build/oedp.spec +++ b/oedp/build/oedp.spec @@ -37,9 +37,11 @@ install -c -m 0500 %{_builddir}/%{name}-%{version}/oedp.py %{buildroot}%{_bindir %postun -# 删除可能会残留的目录 -rm -rf /var/oedp -rm -rf /usr/lib/oedp +if [ $1 -eq 0 ]; then + # 卸载时删除可能会残留的目录 + rm -rf /var/oedp + rm -rf /usr/lib/oedp +fi %files @@ -53,6 +55,6 @@ rm -rf /usr/lib/oedp %attr(0600,root,root) %ghost %{_var}/oedp/log/oedp.log %attr(0500,root,root) %{_usr}/lib/oedp/src/* -%attr(0600,root,root) %config %{_sysconfdir}/oedp/config/log.conf +%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/oedp/config/log.conf %attr(0755,root,root) %{_usr}/share/applications/* %attr(0500,root,root) %{_bindir}/oedp \ No newline at end of file -- Gitee