sidplayfp
sidplayfp copied to clipboard
Default Songlength Database path should be within $HOME, not the install prefix
On Unix-likes, the default path that sidplayfp
looks for a Songlengths.txt
is $PREFIX/share/sidplay/Songlengths.txt
, so on a "typical" Unix-like system, this would be something like /usr/share/sidplayfp/Songlengths.txt
.
I feel this is a weird default, since
- By convention and by FHS, everything under
/usr
is typically the package manager's job to manage. The administrator is not meant to poke around under there manually. - No Linux distribution I checked (Debian, Ubuntu, Fedora, OpenSuSE) that packages
sidplayfp
places aSonglengths.txt
(or.md5
, for that matter) in/usr/share/sidplayfp
, so the default path is essentially useless. The user is forced to editsidplayfp.ini
to have it point to a convenient location, or worse, to (attempt to) copy a file into a directory that could very well be read-only for the current user.
What I would like to suggest instead is the following:
- Follow precedent established by the Kernal, Basic, and Chargen ROMs by searching for either
$XDG_DATA_HOME/sidplayfp/Songlengths.txt
or$HOME/.local/share/sidplayfp/Songlengths.txt
. This makes it so that the user can easily install the database without poking around in essential system files. - Display a warning if the
Songlength Database
option insidplayfp.ini
is unset and there is noSonglengths.txt
in the default location. As it stands, the only indication that the Songlength DB is absent is that every SID file displays anUNKNOWN
length.