DietPi icon indicating copy to clipboard operation
DietPi copied to clipboard

DietPi-Software | Beets: Migrate from DEB package to PyPI wheel

Open zz5zz opened this issue 7 months ago • 5 comments

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?

  1. Create a updated ARM and x86 / x64 package for Debian 13
  2. Host it through https://dietpi.com/apt
  3. 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.

zz5zz avatar Apr 15 '26 18:04 zz5zz

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.

MichaIng avatar Apr 15 '26 19:04 MichaIng

That would be a much better solution long term. Currently installing plugins is a bit hard since it's installed as a deb package.

zz5zz avatar Apr 16 '26 17:04 zz5zz

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.

zz5zz avatar Jul 23 '26 19:07 zz5zz

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.

MichaIng avatar Jul 23 '26 20:07 MichaIng

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.

walker93 avatar Sep 14 '26 20:09 walker93