Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] package.bbclass: Fix base_ver for AUTOINC
@ 2025-11-16 11:54 liezhi.yang
  2025-11-16 11:54 ` [PATCH 1/1] " liezhi.yang
  0 siblings, 1 reply; 2+ messages in thread
From: liezhi.yang @ 2025-11-16 11:54 UTC (permalink / raw)
  To: openembedded-core

From: Robert Yang <liezhi.yang@windriver.com>

The following changes since commit e556df28f47e754b53e1f46c97dde2b19fd8fad1:

  tcp-wrappers: Remove support (2025-11-10 17:56:48 +0000)

are available in the Git repository at:

  https://github.com/robertlinux/yocto rbt/autoinc
  https://github.com/robertlinux/yocto/tree/rbt/autoinc

Robert Yang (1):
  package.bbclass: Fix base_ver for AUTOINC

 meta/classes-global/package.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.49.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] package.bbclass: Fix base_ver for AUTOINC
  2025-11-16 11:54 [PATCH 0/1] package.bbclass: Fix base_ver for AUTOINC liezhi.yang
@ 2025-11-16 11:54 ` liezhi.yang
  0 siblings, 0 replies; 2+ messages in thread
From: liezhi.yang @ 2025-11-16 11:54 UTC (permalink / raw)
  To: openembedded-core

From: Robert Yang <liezhi.yang@windriver.com>

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>
---
 meta/classes-global/package.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes-global/package.bbclass b/meta/classes-global/package.bbclass
index d7ff333f20..bd32a6ede5 100644
--- a/meta/classes-global/package.bbclass
+++ b/meta/classes-global/package.bbclass
@@ -296,8 +296,10 @@ python package_get_auto_pr() {
         conn = oe.prservice.prserv_make_conn(d)
         if conn is not None:
             if "AUTOINC" in pkgv:
+                pr = d.getVar('PR')
+                # Strip PR to make AUTOINC can increase when SRCREV is changed
+                base_ver = "AUTOINC-%s" % version[:-len(pr)]
                 srcpv = bb.fetch2.get_srcrev(d)
-                base_ver = "AUTOINC-%s" % version[:version.find(srcpv)]
                 value = conn.getPR(base_ver, pkgarch, srcpv)
                 d.setVar("PRSERV_PV_AUTOINC", str(value))
 
-- 
2.49.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-16 11:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-16 11:54 [PATCH 0/1] package.bbclass: Fix base_ver for AUTOINC liezhi.yang
2025-11-16 11:54 ` [PATCH 1/1] " liezhi.yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox