Gaudenz Steinlin <gaud...@debian.org> writes:

> Package: sugar-session-0.96
> Version: 0.96.1-2.1
> Severity: normal
>
> The shutdown and restart menu items don't work if the 
> "org.freedesktop.login1" 
> service is not provided. Currently this service is only provided by systemd.
> Just installing the systemd package without using it as an init replacement 
> is not enough. It only works if systemd is the active init system.
>
> Relevant parts from .sugar/default/shell.log:
> 1367232122.614896 ERROR root: Can not stop sugar
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/dist-packages/jarabe/model/session.py", line 64, 
> in shutdown_completed
>     '/org/freedesktop/login1')
>   File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object
>     follow_name_owner_changes=follow_name_owner_changes)
>   File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in 
> __init__
>     self._named_service = conn.activate_name_owner(bus_name)
>   File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in 
> activate_name_owner
>     self.start_service_by_name(bus_name)
>   File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in 
> start_service_by_name
>     'su', (bus_name, flags)))
>   File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in 
> call_blocking
>     message, timeout)
> DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name
> org.freedesktop.login1 was not provided by any .service files

I'm trying to submit the attached patch to the upstream mailinglist
(currently my mail gets rejected). 

Gaudenz
>From c7b5cb33bd5175707adad736866fdea8c609edfd Mon Sep 17 00:00:00 2001
From: Gaudenz Steinlin <gaud...@soziologie.ch>
Date: Mon, 29 Apr 2013 14:49:27 +0200
Subject: [PATCH sugar] Fix systemd detection

os.access directly returns True or False. No need to do C-style
comparisions which actually always return True in Python. Also use the
right constant os.F_OK instead of a magical value.
---
 src/jarabe/model/session.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/jarabe/model/session.py b/src/jarabe/model/session.py
index 7394ef0..037989f 100644
--- a/src/jarabe/model/session.py
+++ b/src/jarabe/model/session.py
@@ -29,7 +29,7 @@ _session_manager = None
 
 
 def have_systemd():
-    return os.access("/sys/fs/cgroup/systemd", 0) >= 0
+    return os.access("/sys/fs/cgroup/systemd", os.F_OK)
 
 
 class SessionManager(session.SessionManager):
-- 
1.7.10.4

>
> Gaudenz
>
> -- System Information:
> Debian Release: 7.0
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
>
> Versions of packages sugar-session-0.96 depends on:
> ii  dbus-x11                   1.6.8-1
> ii  gconf2                     3.2.5-1+build1
> ii  metacity                   1:2.34.3-4
> ii  python                     2.7.3-4
> ii  python-carquinyol-0.96     0.96.0-1
> ii  python-dbus                1.1.1-1
> ii  python-gconf               2.28.1+dfsg-1
> ii  python-gnome2              2.28.1+dfsg-1
> ii  python-gobject             3.2.2-2
> ii  python-gtk2                2.24.0-3+b1
> ii  python-jarabe-0.96         0.96.1-2.1
> ii  python-sugar-0.96          0.96.0-1
> ii  python-sugar-toolkit-0.96  0.96.1-1
> ii  python-wnck                2.32.0+dfsg-2+b1
> ii  sugar-artwork-0.96         0.96.2-1
> ii  x11-xserver-utils          7.7~3
>
> Versions of packages sugar-session-0.96 recommends:
> ii  consolekit                0.4.5-3.1
> ii  ethtool                   1:3.4.2-1
> ii  gvfs                      1.12.3-4
> ii  lsb-release               4.1+Debian9
> ii  modemmanager              0.5.2.0-2
> ii  network-manager           0.9.4.0-10
> ii  openssh-client            1:6.0p1-4
> ii  python-xklavier           0.4-4
> ii  sugar-emulator-0.96       0.96.1-2.1
> ii  sugar-pippy-activity      46~dfsg-2
> ii  sugar-tools-0.96          0.96.1-2.1
> ii  sugar-turtleart-activity  98-1
> ii  tzdata                    2013b-2
> ii  upower                    0.9.17-1
>
> Versions of packages sugar-session-0.96 suggests:
> ii  sucrose-0.96                                                  0.96.1-2.1
> ii  sugar-browse-activity                                         137-1
> ii  sugar-calculate-activity                                      40-2
> pn  sugar-chat-activity-0.86 | sugar-chat-activity                <none>
> pn  sugar-etoys-activity                                          <none>
> pn  sugar-imageviewer-activity-0.96 | sugar-imageviewer-activity  <none>
> pn  sugar-jukebox-activity-0.96 | sugar-jukebox-activity          <none>
> pn  sugar-log-activity-0.86 | sugar-log-activity                  <none>
> pn  sugar-write-activity-0.86 | sugar-write-activity              <none>
>
> -- no debconf information

-- 
Ever tried. Ever failed. No matter.
Try again. Fail again. Fail better.
~ Samuel Beckett ~

Reply via email to