Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make XDG_DATA_DIRS obey the basedir spec #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cmrd-senya
Copy link

The "XDG Base Directory Specification" defines that when XDG_DATA_DIRS is unset the value of /usr/local/share/:/usr/share/ should be used:

If $XDG_DATA_DIRS is either not set or empty, a value equal to /usr/local/share/:/usr/share/ should be used.

::RbConfig::CONFIG['datadir'] call in some environments (e.g. RVM installed Ruby) returns something different. In my case it was "/home/user/.rvm/rubies/ruby-2.6.5/share". This violates the specification. Also due to this violation one specific software project didn't work correctly for me out-of-the box.

I think that most of the GNU/Linux installation actually define XDG_DATA_DIRS explicitly so this code doesn't use the fallback in most of the cases and that's why this went unnoticed. But in the cases when XDG_DATA_DIRS this could lead to bugs.

@peterhoeg
Copy link
Contributor

You probably want to have a look at https://github.com/bkuhlmann/xdg which is the active fork.

@cmrd-senya
Copy link
Author

@peterhoeg yes, I've already figured that out, thanks!
Should this repository be archived with a notice about https://github.com/bkuhlmann/xdg being the new place?

@peterhoeg
Copy link
Contributor

Ideally yes, but @trans hasn't been very active here in a long time.

@cmrd-senya
Copy link
Author

I've opened an issue here: #9

I think it will make it more visible and obvious to the occasional visitors where to look for the up-to-date version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants