DietPi-Software | Beets: Migrate from DEB package to PyPI wheel
Creating a software request
Formal software information
- Software title | Beets
- Short description | Currently deployed as v2.1 with DietPi
- GitHub URL (if available) | https://github.com/beetbox/beets
- (Official) install documentation | https://docs.beets.io/en/latest/guides/installation.html
Are there similar/alternative software titles available with DietPi-Software?
This software already comes with DiePi but with version 2.1 from November 2024
How can DietPi make the installation easier or compatible, than following the install instructions or do APT installation, if available?
Create a .deb package which provides newer version of Beets. Since it cannot be updated through PIP, a new package is required and does not need to be bundled with a new version of DietPi.
Can you provide the installation steps that you would suggest DietPi-Software to do?
- Create a updated ARM and x86 / x64 package for Debian 13
- Host it through https://dietpi.com/apt
- Normal OS update will then upgrade this for end users
Are you willing to help maintaining the software installation, e.g. in case of needed setup changes due to updates etc.? This is not needed, but could speed up our decision to implement it, as man power is always a topic :wink:.
I can create a "build" virtual machine to create packages if needed, this way we can make Beets more up to date since the packages for Debian 13 seem to have stagnated on some areas.
It is v2.2.0 on Trixie, but I get the point.
We compile and distribute own packages only in rare exceptions. Also here I don't think it is reasonable, since it is a Python package, and a pure one with a pre-compiled wheel available on PyPI: https://pypi.org/project/beets/
Hence I could imagine that, instead of installing the Debian package, we could create a venv and install it there. A little wrapper script could call it with the right Python interpreter and respective BEETSDIR, rendering /etc/bashrc.d/dietpi-beets.sh obsolete. This also makes it a lot easier to install 3rd party plugins, as sudo pip install does not really work anymore, to share the same Python instance with Debian packages and PyPI wheels.
That would be a much better solution long term. Currently installing plugins is a bit hard since it's installed as a deb package.
For those who want to keep beets up to date, a workaround is to use the following in /etc/apt/source.list :
deb http://deb.debian.org/debian unstable main contrib non-free
Just do an apt update, then install beets, and nothing more before un-commenting it and redoing a apt update. That way only beets is updated and not every other potentially unstable package. Then you can run latest version of Beets until a better fix is available.
Uhh, be VERY careful when adding Debian unstable/Sid. The way you do it, a apt upprade will bring your system onto an unsupported playground. Apply this guardrail to assure ONLY beets is pulled from there:
cat << '_EOF_' | sudo tee /etc/apt/preferences.d/beets-sid
Package: *
Pin: release a=unstable
Pin-Priority: -1
Package: src:beets
Pin: release a=unstable
Pin-Priority: 500
_EOF_
In this case, however, it depends on some newer Python modules as well, so this is not really suitable. You should really use pip and a venv to pull a newer version:
sudo python3 -m venv /opt/beets
sudo /opt/beets/bin/pip install -U beets
Then you can use /opt/beets/bin/beets. Create an alias beets='/opt/beets/bin/beets' for a shortcut.
Hi,
I tried to do same upgrade today using dietpi-software reinstall but apt said the current version was the newest version.
I'd support switching the default dietpi-software install method for beets to the venv/pip approach suggested above, rather than relying on the Debian package.
I would recommend that dietpi-software would also detect and migrate the current apt installation if present, so the plugins are reinstalled and the config file ported/preserved.