After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 670076 - autorunManger.js needs porting to systemd, too
autorunManger.js needs porting to systemd, too
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks: systemd
 
 
Reported: 2012-02-14 15:12 UTC by Gert Kulyk
Modified: 2012-02-23 08:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Quick and dirty patch (1.23 KB, patch)
2012-02-14 15:14 UTC, Gert Kulyk
none Details | Review
autorunManager: Fix fallout from port to systemd (2.89 KB, patch)
2012-02-14 18:52 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Gert Kulyk 2012-02-14 15:12:52 UTC
After recent commits that are providing systemd support, autorunManager.js does no longer start when media is mounted and systemd is enabled, due to undefined Main.automountManager.ckListener. Here is the output when mounting e.g. an usb stick:

    JS ERROR: !!!   Exception was: TypeError: Main.automountManager.ckListener is undefined
    JS ERROR: !!!     lineNumber = '177'
    JS ERROR: !!!     fileName = '"/usr/share/gnome-shell/js/ui/autorunManager.js"'
    JS ERROR: !!!     stack = '"([object _private_unknown_GUnionVolumeMonitor],[object _private_unknown_GProxyMount])@/usr/share/gnome-shell/js/ui/autorunManager.js:177
wrapper([object _private_unknown_GUnionVolumeMonitor],[object _private_unknown_GProxyMount])@/usr/share/gjs-1.0/lang.js:204
"'
    JS ERROR: !!!     message = '"Main.automountManager.ckListener is undefined"'
Comment 1 Gert Kulyk 2012-02-14 15:14:52 UTC
Created attachment 207526 [details] [review]
Quick and dirty patch

Here is a working patch, but I'm not sure if this is the best solution for the issue.
Comment 2 Jasper St. Pierre (not reading bugmail) 2012-02-14 18:52:56 UTC
Created attachment 207577 [details] [review]
autorunManager: Fix fallout from port to systemd
Comment 3 Gert Kulyk 2012-02-14 20:59:04 UTC
>--- a/js/ui/automountManager.js
>+++ b/js/ui/automountManager.js
>@@ -143,7 +143,7 @@ const AutomountManager = new Lang.Class({
>     _onDriveConnected: function() {
>         // if we're not in the current ConsoleKit session,
>         // or screensaver is active, don't play sounds
>-        if (!this._sessionActive())
>+        if (!this.sessionActive())
>             return;
> 
>         if (this._ssProxy.screenSaverActive)

This hunk contains obviously a typo. Instead of

+        if (!this.sessionActive())

it should be

+        if (!this.isSessionActive())
Comment 4 Jasper St. Pierre (not reading bugmail) 2012-02-14 21:02:40 UTC
Yeah, I fixed that locally right after I uploaded it.
Comment 5 Lennart Poettering 2012-02-14 22:53:50 UTC
Oh, sorry for breaking this. Weird that this didnt go wrong for me.

Patch looks good with that fix Gert suggested.
Comment 6 Owen Taylor 2012-02-15 16:38:17 UTC
Comment on attachment 207577 [details] [review]
autorunManager: Fix fallout from port to systemd

Marking acn based on Lennart's comment, though the commit message could be improved.
Comment 7 Jasper St. Pierre (not reading bugmail) 2012-02-23 08:39:22 UTC
Attachment 207577 [details] pushed as c2a9f7f - autorunManager: Fix fallout from port to systemd