[neon/snap-packaging/plasma-desktop-session] scripts: Provide a run-after.sh to run a program after a D-Bus name showed up

Kevin Ottens null at kde.org
Thu Aug 8 23:48:16 BST 2024


Git commit b112c1049e75498ee22d3d5b64a26fb8a31e422d by Kevin Ottens.
Committed on 08/08/2024 at 22:11.
Pushed by ervin into branch 'master'.

Provide a run-after.sh to run a program after a D-Bus name showed up

Dependency handling in snapcraft has limitations, you can't use
after/before between daemons of different types (although this is
allowed by systemd). So workaround this by waiting for the D-Bus known
name in case like this.

A  +7    -0    scripts/run-after.sh

https://invent.kde.org/neon/snap-packaging/plasma-desktop-session/-/commit/b112c1049e75498ee22d3d5b64a26fb8a31e422d

diff --git a/scripts/run-after.sh b/scripts/run-after.sh
new file mode 100755
index 0000000..aac7577
--- /dev/null
+++ b/scripts/run-after.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+export PULSE_SERVER=unix:/run/user/`id -u`/pulse/native
+
+SERVICE=$1
+shift
+/usr/bin/plasma_waitforname --timeout 20 $SERVICE
+exec "$@"



More information about the Neon-commits mailing list