Fixup services path with the various installed/uninstalled 0.94/0.95 combinations. What a pain!
This commit is contained in:
parent
137b8ddd23
commit
6d84d886e1
@ -12,7 +12,7 @@ bin_SCRIPTS = \
|
||||
install-data-local:
|
||||
$(top_srcdir)/sugar/setup.py \
|
||||
$(top_srcdir)/activities \
|
||||
$(DESTDIR)$(pkgdatadir)/activities \
|
||||
$(DESTDIR)$(datadir)/dbus-1/services \
|
||||
$(bindir)/sugar-activity-factory
|
||||
|
||||
uninstall-local:
|
||||
|
@ -10,8 +10,7 @@
|
||||
|
||||
<listen>unix:tmpdir=/tmp</listen>
|
||||
|
||||
<servicedir>@prefix@/share/sugar/activities</servicedir>
|
||||
<servicedir>@prefix@/share/sugar/services</servicedir>
|
||||
<servicedir>@prefix@/share/dbus-1/services</servicedir>
|
||||
<servicedir>/tmp/sugar-services</servicedir>
|
||||
|
||||
<policy context="default">
|
||||
|
25
dbus-uninstalled-094.conf
Normal file
25
dbus-uninstalled-094.conf
Normal file
@ -0,0 +1,25 @@
|
||||
<!-- This configuration file controls the per-user-login-session message bus.
|
||||
Add a session-local.conf and edit that rather than changing this
|
||||
file directly. -->
|
||||
|
||||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||
<busconfig>
|
||||
<!-- Our well-known bus type, don't change this -->
|
||||
<type>session</type>
|
||||
|
||||
<listen>unix:tmpdir=/tmp</listen>
|
||||
|
||||
<servicedir>/tmp/sugar</servicedir>
|
||||
<servicedir>/tmp/sugar-services</servicedir>
|
||||
|
||||
<policy context="default">
|
||||
<!-- Allow everything to be sent -->
|
||||
<allow send_destination="*"/>
|
||||
<!-- Allow everything to be received -->
|
||||
<allow eavesdrop="true"/>
|
||||
<!-- Allow anyone to own anything -->
|
||||
<allow own="*"/>
|
||||
</policy>
|
||||
|
||||
</busconfig>
|
@ -10,8 +10,8 @@
|
||||
|
||||
<listen>unix:tmpdir=/tmp</listen>
|
||||
|
||||
<standard_session_servicedirs />
|
||||
<servicedir>/tmp/sugar</servicedir>
|
||||
<servicedir>/tmp/sugar-services</servicedir>
|
||||
|
||||
<policy context="default">
|
||||
<!-- Allow everything to be sent -->
|
||||
|
@ -1,4 +1,4 @@
|
||||
servicedir = $(datadir)/sugar/services
|
||||
servicedir = $(datadir)/dbus-1/services
|
||||
service_in_files = org.laptop.Presence.service.in
|
||||
service_DATA = $(service_in_files:.service.in=.service)
|
||||
|
||||
|
@ -73,6 +73,12 @@ emulator.start()
|
||||
if env.get_dbus_version() < '0.95':
|
||||
if not os.path.isdir('/tmp/sugar-services'):
|
||||
os.mkdir('/tmp/sugar-services')
|
||||
dbus_config = env.get_dbus_config_094()
|
||||
else:
|
||||
dbus_config = env.get_dbus_config()
|
||||
|
||||
os.execlp('dbus-launch', 'dbus-launch', '--exit-with-session',
|
||||
'--config-file=%s' % env.get_dbus_config(), program)
|
||||
if dbus_config:
|
||||
os.execlp('dbus-launch', 'dbus-launch', '--exit-with-session',
|
||||
'--config-file=%s' % dbus_config, program)
|
||||
else:
|
||||
os.execlp('dbus-launch', 'dbus-launch', '--exit-with-session', program)
|
||||
|
@ -3,5 +3,6 @@ sugar_data_dir = '@prefix@/share/sugar'
|
||||
sugar_activities_dir = '@prefix@/share/sugar/activities'
|
||||
sugar_activity_info_dir = '@prefix@/share/sugar/activities'
|
||||
sugar_services_dir = '@prefix@/share/sugar/services'
|
||||
sugar_dbus_config = '@prefix@/share/sugar/dbus-installed.conf'
|
||||
sugar_dbus_config = None
|
||||
sugar_dbus_config_094 = '@prefix@/share/sugar/dbus-installed.conf'
|
||||
sugar_shell_bin_dir = '@prefix@/bin'
|
||||
|
@ -9,4 +9,5 @@ sugar_services_dir = os.path.join(_sourcedir, 'services')
|
||||
sugar_activity_info_dir = _tmpdir
|
||||
sugar_activities_dir = os.path.join(_sourcedir, 'activities')
|
||||
sugar_dbus_config = os.path.join(_sourcedir, 'dbus-uninstalled.conf')
|
||||
sugar_dbus_config_094 = os.path.join(_sourcedir, 'dbus-uninstalled-094.conf')
|
||||
sugar_shell_bin_dir = os.path.join(_sourcedir, 'shell')
|
||||
|
@ -54,6 +54,9 @@ def get_services_dir():
|
||||
def get_dbus_config():
|
||||
return sugar_dbus_config
|
||||
|
||||
def get_dbus_config_094():
|
||||
return sugar_dbus_config_094
|
||||
|
||||
def get_shell_bin_dir():
|
||||
return sugar_shell_bin_dir
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user