diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2024-04-02 09:06:58 +0900 |
---|---|---|
committer | HwanKyu Jhun <h.jhun@samsung.com> | 2024-04-02 00:09:23 +0000 |
commit | da20079db3f9c68cd266c8852beced2b49dfbaf2 (patch) | |
tree | 921577e2af30b6b331af3a986a984ff853664b9d | |
parent | c82f54c42e423cf831274d45ca83b0a6086dbe38 (diff) | |
download | launchpad-da20079db3f9c68cd266c8852beced2b49dfbaf2.tar.gz launchpad-da20079db3f9c68cd266c8852beced2b49dfbaf2.tar.bz2 launchpad-da20079db3f9c68cd266c8852beced2b49dfbaf2.zip |
Check dependent service file in posttrans
The launchpad.rpm checks whether the enlightenment-user.service exists
or not in posttrans section. If it does not exists, the rpm removes
depenedencies from the launchpad-process-pool.service.
Change-Id: I0e3a28aca6a3410f734a93c5cd68bf590ece9457
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r-- | packaging/launchpad.spec | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packaging/launchpad.spec b/packaging/launchpad.spec index f78a824..a3c1261 100644 --- a/packaging/launchpad.spec +++ b/packaging/launchpad.spec @@ -43,6 +43,8 @@ Requires(post): /usr/bin/systemctl Requires(postun): /sbin/ldconfig Requires(postun): /usr/bin/systemctl Requires(preun): /usr/bin/systemctl +Requires(posttrans): /usr/bin/echo +Requires(posttrans): /usr/bin/sed Provides: app-launchpad @@ -172,6 +174,15 @@ ln -sf ../launchpad-process-pool.service %{buildroot}%{_unitdir_user}/basic.targ %post lns -sf /usr/bin/false /usr/bin/process-pool +%posttrans +if [ -f %{_unitdir_user}/enlightenment-user.service ]; then + echo "enlightenment-user.service exists"; +else + echo "enlightenment-user.service does not exist"; + sed -i 's/Requires=enlightenment-user.service//' %{_unitdir_user}/launchpad-process-pool.service; + sed -i 's/After=enlightenment-user.service//' %{_unitdir_user}/launchpad-process-pool.service; +fi + %files %manifest launchpad.manifest %license LICENSE |