conda, rpm: Fix package versions sorting
Release 22.0 of packaging module can no longer parse invalid Python version number, an exception is now raised.
RPM loader used the keys of the packages dict as version numbers to sort, which are in the form "//<package_version_number>", but those cannot be parsed anymore.
So use intrinsic version numbers of packages instead to sort the list of versions.
Conda loader used the keys of the packages dict as version numbers to sort, which are in the form "/-", but those cannot be parsed anymore.
So extract intrinsic version numbers of packages instead to sort the list of versions.
Also update snapshot release names to "--" as each release for a given architecture targets a different directory.
Migrated from D8974 (view on Phabricator)
Merge request reports
Activity
Build has FAILED
Patch application report for D8974 (id=32328)
Rebasing onto e7ac7a34...
Current branch diff-target is up to date.
Changes applied before test
commit b6231045473dbcff047126c22a6a43c9bc8cc769 Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Tue Dec 20 11:34:58 2022 +0100 rpm: Fix package versions sorting Release 22.0 of packaging module can no longer parse invalid Python version number, an exception is now raised. RPM loader used the keys of the packages dict as version numbers to sort, which are in the form "<distribution>/<edition>/<package_version_number>", but those cannot be parsed anymore. So use intrinsic version numbers of packages instead to sort the list of versions.
Link to build: https://jenkins.softwareheritage.org/job/DLDBASE/job/tests-on-diff/1035/ See console output for more information: https://jenkins.softwareheritage.org/job/DLDBASE/job/tests-on-diff/1035/console
Build is green
Patch application report for D8974 (id=32329)
Rebasing onto e7ac7a34...
Current branch diff-target is up to date.
Changes applied before test
commit a63b39e5056fe39bf2b903bd66b9873d13c400db Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Tue Dec 20 12:24:41 2022 +0100 conda: Fix versions sorting and update release names Release 22.0 of packaging module can no longer parse invalid Python version number, an exception is now raised. Conda loader used the keys of the packages dict as version numbers to sort, which are in the form "<arch>/<version>-<build>", but those cannot be parsed anymore. So extract intrinsic version numbers of packages instead to sort the list of versions. Also update snapshot release names to "<version>-<build>-<arch>" as each release for a given architecture targets a different directory. commit b6231045473dbcff047126c22a6a43c9bc8cc769 Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Tue Dec 20 11:34:58 2022 +0100 rpm: Fix package versions sorting Release 22.0 of packaging module can no longer parse invalid Python version number, an exception is now raised. RPM loader used the keys of the packages dict as version numbers to sort, which are in the form "<distribution>/<edition>/<package_version_number>", but those cannot be parsed anymore. So use intrinsic version numbers of packages instead to sort the list of versions.
See https://jenkins.softwareheritage.org/job/DLDBASE/job/tests-on-diff/1036/ for more details.