mplayer (Message sign� : )

David Nečas yeti at physics.muni.cz
Sun Dec 2 16:18:59 PST 2012


On Sun, Dec 02, 2012 at 11:10:33PM -0000, faispasierch at brefmail.com wrote:
> Please help mplayer to support XDG Base Directory Specification:
> 
> http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1857

Please specify the XDG Base Directory to make sense to program
developers, as requested by mplayer developers.

I am in a similar situation, having things that may be created/edited by
users or the program, user-installed plug-ins and scripts that may be,
in fact, user-written plug-ins and scripts, arch-dependent modules and
data, files that are essentially run-time state but the user may want to
modify them manually, etc.  After reading the specs a dozen times I
still have no idea what should go where.

This attempts to provide some guidelines

    http://ploum.net/post/207-modify-your-application-to-use-xdg-folders

but according to it the same file belongs to different places, depending
on how the user have come to its possession: If the user wrote a script
himself, he will be crying if it is deleted.  So it must go to
XDG_DATA_HOME.  But if exactly the same script is installed as an
extension it should go to XDG_CONFIG_HOME.  So directories must be
duplicated between XDG_DATA_HOME and XDG_CONFIG_HOME.  Which means
people will put their scripts to one or another randomly (you cannot
really stop them if both work) defeating the distinction.

What if the user installs an extension and, later, decides to modify it?
Does he have to move it from XDG_CONFIG_HOME to XDG_DATA_HOME because it
becomes valuable now?

The alternative is, of course, to just put everything to XDG_DATA_HOME,
except this is exactly what the guidelines advise against.

Furthermore, if a file contains one value it is probably configuration.
If it contains a thousand it is probably data.  And if it contains five
values?  Six?  A dozen?  16?  25?  41?  77?  118?  464?

What if tools in the program remember their configuration?  Losing the
parameter set for one tool would not make me cry, however, losing all of
them would.

Who am I to judge what the user will consider valuable data and what he
will consider just configuration?

I am afraid XDG Base Directory Specification, as currently specified,
tries to impose distinctions that do not exist in reality.

If it said ‘if unsure, just put everything under XDG_DATA_HOME‘
developers would shrug and do precisely that.  After a few years we
might silently delete XDG_CONFIG_HOME because it would be empty and
everyone would live happily ever after.

Unfortunately, the situation is exactly opposite: program developers are
asked to [cite]choose carefully[/cite] between categories that do not
make sense to them.

Thank you for reading this.

Yeti



More information about the xdg mailing list