Skip to content

Don't offer distro upgrade from unknown version

If the current version string is empty, i.e. the current distro release is unknown, don't try to find the next distro version to upgrade to.

AppStream::Utils::vercmpSimple would consider any non-empty version to be greater than the current one, which would e.g. result in Discover offering to "upgrade" from Debian testing (codename "trixie") which will one day become Debian 13 to Debian 9.

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux trixie/sid"
NAME="Debian GNU/Linux"
VERSION_CODENAME=trixie
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Screenshot without this change in place:

2024-12-01_screenshot_discover_upgrade_suggestion

Merge request reports

Loading