Bug 34496 - dbus should check $XDG_DATA_HOME *before* $XDG_DATA_DIRS
Summary: dbus should check $XDG_DATA_HOME *before* $XDG_DATA_DIRS
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.4.x
Hardware: All Linux (All)
: medium normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL: http://git.collabora.co.uk/?p=user/sm...
Whiteboard:
Keywords: patch
: 35569 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-20 02:11 UTC by Anders Kaseorg
Modified: 2011-04-09 08:40 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Give XDG_DATA_HOME priority over XDG_DATA_DIRS for servicedirs (2.74 KB, patch)
2011-02-20 02:26 UTC, Anders Kaseorg
Details | Splinter Review
config-parser regression test: don't require that fd.o #34496 exists (1018 bytes, patch)
2011-02-24 10:36 UTC, Simon McVittie
Details | Splinter Review

Description Anders Kaseorg 2011-02-20 02:11:06 UTC
According to the XDG Base Directory Specification, “The base directory defined by $XDG_DATA_HOME is considered more important than any of the base directories defined by $XDG_DATA_DIRS.”  However, DBUS currently gives $XDG_DATA_DIRS priority over $XDG_DATA_HOME when looking for service directories.  This makes it unnecessarily difficult to override a system service file as a normal user.
Comment 1 Anders Kaseorg 2011-02-20 02:26:18 UTC
Created attachment 43568 [details] [review]
Give XDG_DATA_HOME priority over XDG_DATA_DIRS for servicedirs

Here’s a patch, tested on Ubuntu natty.
Comment 2 Simon McVittie 2011-02-24 09:18:29 UTC
Thanks, I committed your patch. Will be fixed in 1.4.8, 1.5.0.
Comment 3 Simon McVittie 2011-02-24 10:34:19 UTC
Unfortunately, this breaks the regression tests (which I forgot to run before pushing). Proposed patch on the way.
Comment 4 Simon McVittie 2011-02-24 10:36:24 UTC
Created attachment 43764 [details] [review]
config-parser regression test: don't require that fd.o #34496 exists

The directories are now obviously the way round we want them: the user's locally-installed things have precedence over the sysadmin's system-wide-installed things, which have precedence over things from the distribution.
Comment 5 Will Thompson 2011-02-24 10:38:53 UTC
Review of attachment 43764 [details] [review]:

Ship it.
Comment 6 Anders Kaseorg 2011-02-24 13:02:40 UTC
Thanks.  FYI, when committing a patch written by someone else, you can use either ‘git am’ or ‘git commit --author=…’ to preserve the authorship information.

http://live.gnome.org/Git/Developers#Applying_Patches
http://live.gnome.org/Git/Developers#Committing_on_behalf_of_a_contributor
Comment 7 Simon McVittie 2011-03-01 06:27:43 UTC
(In reply to comment #6)
> Thanks.  FYI, when committing a patch written by someone else, you can use
> either ‘git am’ or ‘git commit --author=…’ to preserve the authorship
> information.

Yeah, I did use `git am`, but the attribution got lost during conflict resolution and I didn't spot it until I'd already pushed. Sorry about that...
Comment 8 Simon McVittie 2011-04-07 04:03:04 UTC
*** Bug 35569 has been marked as a duplicate of this bug. ***
Comment 9 Dan Muresan 2011-04-09 08:40:27 UTC
(In reply to comment #8)
> *** Bug 35569 has been marked as a duplicate of this bug. ***

Thanks. Would it be possible to backport this fix to 1.4.6 (the stable branch)? Ubuntu Natty is nearing release, and I would hate to deal with buggy Ubuntus for years to come now.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.