projects
/
platform
/
core
/
test
/
security-tests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb95f92
)
Fix %postun being called on the end of package upgrade/reinstall making tests fail
85/319685/2
author
Krzysztof Malysa
<k.malysa@samsung.com>
Fri, 14 Feb 2025 13:02:18 +0000
(14:02 +0100)
committer
Krzysztof Małysa
<k.malysa@samsung.com>
Fri, 14 Feb 2025 13:04:12 +0000
(13:04 +0000)
Change-Id: Id3796fbfbdd43f1e5a1dd46b42ba9546f3ef68cb
packaging/security-tests.spec
patch
|
blob
|
history
diff --git
a/packaging/security-tests.spec
b/packaging/security-tests.spec
index f140987099d5fa6db63f5d4ea1dcb0a5bfd38cb0..354097e9e334560164dd42dd37e9ccb620f4816a 100644
(file)
--- a/
packaging/security-tests.spec
+++ b/
packaging/security-tests.spec
@@
-144,4
+144,8
@@
echo "security-tests postinst done ..."
%{sm_test_dir}
%postun
-id -u security_test_user 1>/dev/null 2>&1 && gum-utils -o -d --uid=`id -u security_test_user`
+# RPM has irrational order of calling %postun during upgrade and reinstallation: first it installs
+# new version, then it uninstalls old version and calls %postun, hence the below if...
+if [ $1 = 0 ]; then
+ id -u security_test_user 1>/dev/null 2>&1 && gum-utils -o -d --uid=`id -u security_test_user`
+fi