]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
package.bbclass: Fix base_ver for AUTOINC
authorRobert Yang <liezhi.yang@windriver.com>
Sun, 16 Nov 2025 11:54:20 +0000 (03:54 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 20 Nov 2025 11:22:12 +0000 (11:22 +0000)
commit2d14aae0b069c312fd810b208255fe1f8406d9ad
tree47b63006668c67f1c7ad9e4d61fbf0454dd24f0a
parentbabb02b5218ba0fe5c00745e115961eb15de674e
package.bbclass: Fix base_ver for AUTOINC

The srcpv isn't in PV any more after the following commit:

a8e7b0f932 base/package: Move source revision information from PV to PKGV

So the version.find(srcpv) will be -1, which would make base_ver to something like:
glibc-2.39+git-r (The 0 is removed)

There will be bugs when both of the following conditions are met:
* The srcrev is upgraded from value such as cff104 to b027d5 (b is less c)
* The PR value is changed from value such as r0 to r10

This would make glibc-2.39+git-r can't match glibc-2.39+git-r1, so the AUTOINC won't work,
and would still be git0, then buildhistory would report errors like:

ERROR: glibc-2.39+git-r0 do_packagedata_setscene: QA Issue: Package version for package glibc-src went backwards which would break package feeds (from 0:2.39+git0+cff1042cce-r0.0 to 0:2.39+git0+b027d5b145-r10.0) [version-going-backwards]

Strip PR to make it work as before, just like it stripped the string after
srcpv in the past.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/package.bbclass