datarootdir v.s. datadir

Public Service Announcement: Debian helpfully┬ádefines datadir to be /usr/share/games for some packages, which means that the AppData and MetaInfo files get installed into /usr/share/games/appdata which isn’t picked up by the metadata parsers.

It’s probably safer to install the AppData files into $datarootdir/appdata as this will work even if a distro has redefined datadir to be something slightly odd. I’ve changed the examples on the AppData page, but if you maintain a game on Debian with AppData then this might affect you when Debian starts extracting AppSpream metadata in the next few weeks. Anyone affected will be getting email in the next few days, although it only looks to affect very few people.

3 responses to “datarootdir v.s. datadir”

  1. Fabian

    Debian itself doesn’t define variables, this happens on a per-package base and is thus in control of the respective maintainer. Which package did you find affected by this odd definition?

  2. Ole Laursen

    I’ve been bitten by that too. Someone at some point decided it was a good idea to arbitrarily put games in special directory. While I can see that may have made sense from a corporate perspective years ago when it wasn’t easy to filter on package metadata, it’s just silly now. I wish someone would make it a goal in Debian to kill that exception.

  3. smcv

    If a game in Debian is configured with ${datadir} = /usr/share/games, it’s straightforward for its packager to redirect the app-data, desktop files, etc. back into /usr/share/whatever (via debian/install).

    Neither debhelper nor cdbs seems to have any special magic for /usr/share/games, so if a particular game has ${datadir} = /usr/share/games, that would have to be something its packager had done deliberately…

    Debian Policy says game executables should be in /usr/games instead of /usr/bin, and Lintian currently checks for that. Some game packagers think that’s wrong and want to change it; it’s somewhat stronger than what the FHS says, which is that /usr/games *may* exist (but does not seem to require that all games are there). Similarly, the FHS says /usr/share/games and /usr/lib/games may exist, but does not seem to require that games must use them.

Bad Behavior has blocked 2769 access attempts in the last 7 days.