Base Directory Specification and plugins

David Faure faure at kde.org
Sun Dec 11 02:50:21 PST 2011


On Tuesday 06 September 2011 23:02:21 Yury G.  Kudryashov wrote:
> Yury G.  Kudryashov wrote:
> >>> What do you think about $XDG_LIBRARY_DIRS${LIB_SUFFIX},

If anything, this should be called XDG_PLUGIN_DIRS or XDG_PLUGIN_PATH.

To make it clear that it's about dlopened plugins, not about shared libraries 
(which LD_LIBRARY_PATH is about).

There is one issue with pointing everyone (kde, Qt, gtk, gst etc.) to the same 
directory though : unless the plugins are known by name already (e.g. via a 
.desktop file), the common implementation (e.g. in Qt 4) is "iterate over all 
plugins in the directory and open them all". This can easily crash if the 
plugins load incompatible libraries. For this reason Qt uses known subdirs 
(plugindir/{designer, imageformats, sqldrivers, crypto, etc.))
but if other frameworks use the same subdir names, then it will still happen, 
opening a plugin that loads an incompat library (e.g. older libpng, libc, 
whatever) and crash.

Ah, so that's what your LIBRARY_SPECIFIC_SUFFIX was about, right?
To make that easier to understand, please don't define it as "being part of 
LIB_SUFFIX", LIB_SUFFIX is usually only arch stuff.
A mandatory implementation-specific suffix (subdir) is orthogonal, and very 
much needed too, indeed.

> Sorry for answering my own e-mail. What is the standard process of adding
> something to the xdg dirs standard? Should I prepare a patch with exact
> phrasing? 

I guess so.

E.g. at the moment I'm missing some information on what the default value 
would be :-)

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. KDE Frameworks 5



More information about the xdg mailing list