plugins directory not found after default install

Bug #414594 reported by bazwal
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Exaile
Fix Released
Medium
Unassigned

Bug Description

exaile-0.3.0b1 running on linux2 (mandriva 2009.1)

after installing exaile using the default prefix of /usr/local, the plugins directory was not found on my system. this is because another application had already set XDG_DATA_DIRS, and the list of paths did not happen to include /usr/local/share.

i have fixed this by making sure XDG_DATA_DIRS is set properly in my bash_profile.

however, i think exaile should always enforce the inclusion of INSTALL_PREFIX/share/exaile in its list of data directories. at the moment, /usr/local/share is only guaranteed to be included if XDG_DATA_DIRS has not been set at all.

Revision history for this message
reacocard (reacocard) wrote :

We're just following the xdg spec exactly:

"If $XDG_DATA_DIRS is either not set or empty, a value equal to /usr/local/share/:/usr/share/ should be used." - http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html

If another application has broken that default, then it's not our place to fix that application.

Changed in exaile:
milestone: none → 0.3.0
status: New → Won't Fix
Revision history for this message
bazwal (bazwal) wrote :

yes, i looked at that spec. any application that sets XDG_DATA_DIRS should ensure that the default paths are included in the list. i have no argument with that.

what i was trying to get at was: installations of exaile may break if a prefix is used that is not in the list of xdg defaults.

for instance, if i installed exaile under the /opt directory, it would not find the plugins in /opt/share/exaile/plugins because /opt/share is not one of the default xdg data directories. (of course, some other application may have added it).

should users be able to choose where to install exaile? if so, at the very least, the installation instructions should include a warning about the possible consequences of doing that.

Revision history for this message
reacocard (reacocard) wrote :

> what i was trying to get at was: installations of exaile may break if a prefix is used that is not in the list of xdg defaults.

Yes, but the default prefix _is_ in the set of paths, and therefore it is my opinion that it is the user's job to ensure that they set XDG_DATA_DIRS appropriately if they choose a non-standard prefix.

> at the very least, the installation instructions should include a warning about the possible consequences of doing that.

true, this is worth mentioning.

Changed in exaile:
importance: Undecided → Low
status: Won't Fix → Confirmed
Revision history for this message
reacocard (reacocard) wrote :

note added in r2349

Changed in exaile:
status: Confirmed → Fix Committed
reacocard (reacocard)
Changed in exaile:
status: Fix Committed → Fix Released
Revision history for this message
reacocard (reacocard) wrote :

It occurred to me recently that we could fix this more-fully by setting these vars in the resulting PREFIX/bin/exaile script. we already do a similar action to this to set the path to the main exaile.py script. Logic for the additional code would be something like

if xdg_var is set, xdg_var=xdg_var:custom_location
else, xdg_var=xdg_defaults:custom_location

for both XDG_CONFIG_DIRS and XDG_DATA_DIRS

Changed in exaile:
milestone: 0.3.0 → 0.3.1
status: Fix Released → In Progress
reacocard (reacocard)
Changed in exaile:
importance: Low → Medium
milestone: 0.3.1 → 0.3.2
Revision history for this message
Dan Fuhry (danfuhry) wrote :

Here's my patch as discussed in IRC. It basically creates a launcher script which gracefully handles XDG_DATA_DIRS and the case of installation into a relative prefix.

If the system has readlink installed, relative prefix installation is supported; otherwise, the generate-launcher script will fail with an error message. The readlink utility is not required for absolute path installations (the vast majority of cases).

Before committing, chmod +x tools/generate-launcher

Revision history for this message
reacocard (reacocard) wrote :

patch committed trunk/2886, thanks!

Changed in exaile:
milestone: 0.3.2 → 0.3.1
status: In Progress → Fix Committed
reacocard (reacocard)
Changed in exaile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.