Source: what-is-python Version: 14 Severity: normal Tags: patch While preparing a backport of the fix for #1034995 to bookworm, the package build failed due to an empty version being generated.
I'm attaching a patch fixing the version mangling for the most common cases, i.e. versions containing a suffix starting with '.', '+' or '~'. I've verified that this produces packages with correctly ordered versions. Andreas
diff -Nru what-is-python-14/debian/changelog what-is-python-15/debian/changelog --- what-is-python-14/debian/changelog 2023-06-13 12:17:23.000000000 +0200 +++ what-is-python-15/debian/changelog 2024-04-19 10:39:12.000000000 +0200 @@ -1,3 +1,11 @@ +what-is-python (15) UNRELEASED; urgency=medium + + * Bump version to 11.8. + * Fix version mangling for NMU, stable or backports uploads, i.e. versions + with a suffix starting with a non-digit ([.+~]). + + -- Andreas Beckmann <[email protected]> Fri, 19 Apr 2024 10:39:12 +0200 + what-is-python (14) unstable; urgency=medium * python-is-python3: Add breaks/replaces to python-dev-is-python2. diff -Nru what-is-python-14/debian/rules what-is-python-15/debian/rules --- what-is-python-14/debian/rules 2023-06-13 12:17:23.000000000 +0200 +++ what-is-python-15/debian/rules 2024-04-19 10:39:12.000000000 +0200 @@ -1,7 +1,10 @@ #!/usr/bin/make -f include /usr/share/dpkg/default.mk -v3 := 3.11.4-$(shell expr $(DEB_VERSION) - 13) +DEB_VERSION_BASE = $(firstword $(subst +, ,$(subst ~, ,$(subst ., ,$(DEB_VERSION))))) +DEB_VERSION_SUFFIX = $(patsubst $(DEB_VERSION_BASE)%,%,$(DEB_VERSION)) + +v3 := 3.11.8-$(shell expr $(DEB_VERSION_BASE) - 14)$(DEB_VERSION_SUFFIX) %: dh $@

