D-Bus session: updated Akonadi startup
Pre-starting Akonadi for test-dbus.py doesn't work because of differences in the environment of Akonadi server and client (XDG root). Disabled it for D-Bus testing, which must work without Akonadi (and cannot test it...). Also changed the sleep statement so that dbus-session.sh sleeps after starting either EDS or Akonadi.
This commit is contained in:
parent
5ac975a7fb
commit
87d5378191
|
@ -31,15 +31,24 @@ trap atexit EXIT
|
|||
# e-addressbook/calendar-factory.
|
||||
#
|
||||
# Similar for DBUS_SESSION_SH_AKONADI, except that we rely on akonadictl
|
||||
# and don't run it under valgrind.
|
||||
# and don't run it under valgrind. We also don't start it for test-dbus.py,
|
||||
# because starting it with "normal" XDG env variables and trying to
|
||||
# connect to it with XDG env set in test-dbus.py failed:
|
||||
# libakonadi Akonadi::SessionPrivate::init: Akonadi Client Session: connection config file ' akonadi/akonadiconnectionrc can not be found in ' "/data/runtests/work/lucid-amd64/build/src/temp-test-dbus/config" ' nor in any of ("/etc/xdg", "/etc")
|
||||
#
|
||||
E_CAL_PID=
|
||||
E_BOOK_PID=
|
||||
case "$@" in *valgrind*) prefix=`echo $@ | perl -p -e 's;.*?(\S*/?valgrind\S*).*;$1;'`;;
|
||||
*syncevolution\ *|*client-test\ *|*test-dbus.py\ *|*gdb\ *) prefix=env;;
|
||||
*) prefix=;; # don't start EDS
|
||||
esac
|
||||
if [ "$DBUS_SESSION_SH_AKONADI" ] && [ "$prefix" ]; then
|
||||
akonadi=$prefix
|
||||
case "$@" in *test-dbus.py\ *) akonadi=;;
|
||||
esac
|
||||
|
||||
if [ "$DBUS_SESSION_SH_AKONADI" ] && [ "$akonadi" ]; then
|
||||
akonadictl start
|
||||
SLEEP=5
|
||||
else
|
||||
DBUS_SESSION_SH_AKONADI=
|
||||
fi
|
||||
|
@ -50,11 +59,13 @@ if [ "$DBUS_SESSION_SH_EDS_BASE" ] && [ "$prefix" ]; then
|
|||
E_BOOK_PID=$!
|
||||
|
||||
# give daemons some time to start and register with D-Bus
|
||||
sleep 5
|
||||
SLEEP=5
|
||||
else
|
||||
DBUS_SESSION_SH_EDS_BASE=
|
||||
fi
|
||||
|
||||
sleep $SLEEP
|
||||
|
||||
# run program
|
||||
"$@"
|
||||
res=$?
|
||||
|
|
Loading…
Reference in a new issue