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 768036 - Warning on startup when dbus-update-activation-environment is unavailable
Warning on startup when dbus-update-activation-environment is unavailable
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
3.21.x
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-06-25 16:45 UTC by Michael Catanzaro
Modified: 2016-09-02 02:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnome-session: avoid warning in startup script (948 bytes, patch)
2016-06-25 16:45 UTC, Michael Catanzaro
none Details | Review
A little modification based on Michael's patch. (771 bytes, patch)
2016-08-16 11:47 UTC, Felix Zhang
none Details | Review
Patch based on Ray's comment (1.15 KB, patch)
2016-08-16 14:17 UTC, Dominique Leuenberger
committed Details | Review

Description Michael Catanzaro 2016-06-25 16:45:44 UTC
Created attachment 330366 [details] [review]
gnome-session: avoid warning in startup script

Debian has dbus-update-activation-environment in a dbus-user-session subpackage. In case it is uninstalled, an ugly warning gets printed when starting gnome-session:

$ gnome-session
/usr/bin/gnome-session: 15: /usr/bin/gnome-session: dbus-update-activation-environment: not found

Avoid it.
Comment 1 Laurent Bigonville 2016-06-25 16:53:55 UTC
dbus-update-activation-environment is part of the dbus package in debian.

I don't think that anything in GNOME whould work without dbus (tell me if I'm wrong), so it should be present already.
Comment 2 Michael Catanzaro 2016-06-25 18:48:43 UTC
(In reply to Laurent Bigonville from comment #1)
> dbus-update-activation-environment is part of the dbus package in debian.

Um, yeah, I guess I must have just assumed this was not the case without checking...? So ignore this bug.
Comment 3 Michael Catanzaro 2016-06-25 18:50:28 UTC
(In reply to Michael Catanzaro from comment #2) 
> Um, yeah, I guess I must have just assumed this was not the case without
> checking...? So ignore this bug.

Yeah, my downstream environment's dbus package is based on an older version of Debian, and I just assumed the absence of the binary meant it was in the other package, and tricked myself into thinking I had checked that when I did not.

So we'll just carry this downstream until we get newer dbus.
Comment 4 Michael Catanzaro 2016-06-25 18:54:16 UTC
Comment on attachment 330366 [details] [review]
gnome-session: avoid warning in startup script

(note: the change is harmless, but the commit message is wrong)
Comment 5 Dominique Leuenberger 2016-08-16 11:29:06 UTC
I'd like to pick this up again - the patch seems trivial enough and imho only the commit message would need to be corrected.

dbus-update-activation-environment was introduced with dbus 1.10.4 - so silencing this warning only means that we correctly do not require such a high dbus version

gnome-session by itself does not depend on any specific version of dbus at all - but on dbus-glib-1 (DBUS_GLIB_REQUIRED=0.76)

the latest version of dbus-glib (ver 106) still only requires dbus-1 1.8 - it is thus a valid setup
Comment 6 Felix Zhang 2016-08-16 11:37:54 UTC
Review of attachment 330366 [details] [review]:

It might be better to add 2>&1 after which call, or we see another warning:

which: no dbus-update-activation-environment in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
Comment 7 Felix Zhang 2016-08-16 11:47:32 UTC
Created attachment 333404 [details] [review]
A little modification based on Michael's patch.
Comment 8 Ray Strode [halfline] 2016-08-16 14:09:58 UTC
Review of attachment 333404 [details] [review]:

::: gnome-session/gnome-session.in
@@ +16,1 @@
 

i don't think we need the which call.

just:

 dbus-update-activation-environment --all >& /dev/null ||:

should be enough
Comment 9 Dominique Leuenberger 2016-08-16 14:17:55 UTC
Created attachment 333421 [details] [review]
Patch based on Ray's comment
Comment 10 Ray Strode [halfline] 2016-08-16 15:02:40 UTC
Review of attachment 333421 [details] [review]:

.
Comment 11 Dominique Leuenberger 2016-08-16 15:11:50 UTC
Comment on attachment 333421 [details] [review]
Patch based on Ray's comment

pushed as 4abdb7