publishing issue due to sync2aptly miscalculates which version is newer
Background
Just before the Trixie freeze, a bunch of packages have been uploaded to the Debian archive with a ~rc
or ~beta
string in their versions.
These versions have been imported in v2026dev2 for the rebase and then later a higher version without the ~rc
or ~beta
have been imported in v2026dev2. Let's use fuse3
as an example: we had fuse3
version 3.17.1~rc1-3+apertis0bv2026dev2b1
and then later 3.17.1+git250416-1+apertis0bv2026dev2b1
. But sync2aptly
considers 3.17.1~rc1-3...
higher than 3.17.1+git250416-1...
with messages like:
2025-04-30T10:24:02.845712Z WARN sync:sync:sync: sync2aptly: /srv/obs/repos/apertis:/v2026dev2:/target/default/armv7hl/fuse3_3.17.1+git250416-1+apertis0bv2026dev2b1_armhf.deb older than Parmhf fuse3 3.17.1~rc1-3+apertis0bv2026dev2b1 6c3b7dfe8c4033a4 in aptly
This prevents the publishing of the new package.
Whereas dpkg
does the right thing:
$ dpkg --compare-versions '48.0-1+apertis0bv2026dev2b1' gt '48~beta-1+apertis0bv2026dev2b1' && echo YES
YES
We also have a bunch of gnome
packages with versions like 48~
and then only 48
.
This seems to be due to the code at https://github.com/indygreg/linux-packaging-rs/blob/main/debian-packaging/src/package_version.rs#L231
Reproducibility
Put the
- always
-
✅ often, but not always - rarely
Impact of bug
New package updates are not published.
Outcomes
https://github.com/indygreg/linux-packaging-rs/pull/27 https://github.com/collabora/aptly-rest-tools/pull/29
Management data
This section is for management only, it should be the last one in the description.
/cc @em @balasubramanian @sudarshan @wlozano
Phabricator link: https://phabricator.apertis.org/T11041