Bug 13284 - XDG fails on KDE live cds for system install (confirmed for Kubuntu)
Summary: XDG fails on KDE live cds for system install (confirmed for Kubuntu)
Status: RESOLVED MOVED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: 1.0
Hardware: All All
: high critical
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-16 23:49 UTC by Jason Taylor
Modified: 2019-02-16 13:28 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Jason Taylor 2007-11-16 23:49:21 UTC
xdg-utils uses the last path return from

sudo kde-config --path mime

to get its install location

The last path is /rofs/usr/share/...

this path is read only so install fails
Comment 1 Repre Hendor 2007-11-17 02:51:02 UTC
(In reply to comment #0:)
 
> The last path is /rofs/usr/share/...


This can only happen on Live CD systems.

And only on these live CDs which use the (older, buggier, inferior) UnionFS instead of the (newer, less buggy, superior) AuFS union mount. [AuFS was developed as a drop in replacement of UnionFS, using the same API, but from scratch re-engineered interally...]

This is not an XDG issue.

Is this a problem hitting 'klik'?  Thanks for using XDG anyway  :-)
Comment 2 Diego Elio Pettenò 2008-01-28 14:36:11 UTC
This is far from being a problem just with live CDs.
The fact that xdg-mime uses kde-config to discover the path (and xdg-desktop-menu _hardcodes_ the path to /usr/share/applnk) makes it impossible to use xdg-utils reliably to install files during distribution packaging.

I'm hitting this problem packaging libprs500 for Gentoo: the finalisation script uses xdg-utils to install a the .desktop files, icons and similar. While I can use XDG_DATA_DIRS to fool xdg-utils into installing in DESTDIR != / the shared files, when it comes to KDE-based stuff I can't override it from environment.

It would be nice if xdg-utils used KDEDIR/KDEDIRS environment variable before using kde-config.
Comment 3 Jason Taylor 2008-01-28 14:58:04 UTC
I can confirm the issue is with kde-config there is also no sane way to override the path for kde.
Comment 4 Repre Hendor 2008-01-28 15:17:24 UTC
Diego, Jason,

so do you propose to use the following algorithm?

* check if KDEDIR is set; if so, use it.
* else, check if KDEDIRS is set; if so, use one of the paths (which one?!?).
* else, use "kde-config --...." to determin the installation path.

Do you want the KDEDIR(S) thingie so you can *set* it yourself at random values?
Comment 5 Jason Taylor 2008-01-28 15:50:17 UTC
Im not sure what the best fix is... but at the moment though xdg is unusable for kde on live cd's (and other locations).

At the very least a way to override the install path would be appreciated.

We could then at least have parsed the path and removed the /rofs manually
Comment 6 Diego Elio Pettenò 2008-01-29 04:46:53 UTC
I'd suggest using the first entry in KDEDIRS, myself; on distributions like Gentoo where the whole base of KDE is in one path, and the additional programs are in a different one, that should be the path of the additional programs.

I'll open a different bug to ask for a --destdir parameter anyway, that's complementary, not a replacement, to make it easier for upstream to use xdg-utils during installation without driving distributors crazy.
Comment 7 Diego Elio Pettenò 2008-01-29 05:44:15 UTC
For what it's worth, xdg-desktop-menu also ignores KDEHOME environment variable (which kde-config takes into consideration).

To discover which path to use for user directories for kde, one should consider the KDEHOME variable, and just if that's unset use ${HOME}/.kde.
Comment 8 GitLab Migration User 2019-02-16 13:28:46 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/20.


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.