Experienced the same issue @10479 did. Resolved after manually performing a copy of relevant files from the old directory and tweaking config.ini to align to new path.
# cp /opt/headphones/headphones.db /var/lib/headphones/
# cp /opt/headphones/config.ini /var/lib/headphones/
# sed -i 's_/opt/_/var/lib/_g' /var/lib/headphones/config.ini
# chown headphones:headphones /var/lib/headphones/{config.ini,headphones.db}
No worries. Thanks for maintaining the package!
Hi @10479, sorry for the breakage.
The issue is that the post_upgrade function starts before the pacman hooks, which create /var/lib/headphones and the headphones user. It's a bit dirty because I prefer relying on hooks, but I forced the creation of tmpfiles and users in the .install file.
This latest update gave me a bit of trouble.
cp: cannot create regular file '/var/lib/headphones/': Not a directory
Copied config.ini from /opt/headphones/ -> /var/lib/headphones/
cp: cannot create regular file '/var/lib/headphones/': Not a directory
Copied headphones.db from /opt/headphones/ -> /var/lib/headphones/
Copied logs from /opt/headphones/ -> /var/lib/headphones/
Copied cache from /opt/headphones/ -> /var/lib/headphones/
usermod: user headphones is currently used by process 501
Could not change headphones users home directory.
Run: sudo systemctl stop headphones ; sudo usermod -d /var/lib/headphones headphones ; sudo systemctl start headphones
I don't know if it would have helped to stop headphones first, but I ended up with a default config after updte. Fortunately I just had to copy my opt/headphones/config.ini and headphones.db over to the new /var/lib/headphones directory and restart the service. I did follow the instructions running that list of recommended commands as well at the end of that output.
Had a bit of a scare that all configs/db were gone.