public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] meta/conf/bitbake.conf: enable SRCPV support for AUTOREV
@ 2023-04-12 10:17 Srinuvasan Arjunan
  2023-04-13  7:02 ` Jan Kiszka
  0 siblings, 1 reply; 14+ messages in thread
From: Srinuvasan Arjunan @ 2023-04-12 10:17 UTC (permalink / raw)
  To: isar-users; +Cc: jan.kiszka, Srinuvasan A

From: Srinuvasan A <srinuvasan_a@mentor.com>

One of our downstream project recipe uses `SRCREV = "${AUTOREV}"` to get
the latest changes always, but this not works after bitbake 2 migration,
it throws the below error.

do_fetch: Fetcher failure: Recipe uses a floating tag/branch without a fixed SRCREV yet doesn't call bb.fetch2.get_srcrev() (use SRCPV in PV for OE).

Till now we don't have support for SRCPV in ISAR, hence add this support
as like OE.

Signed-off-by: Srinuvasan A <srinuvasan_a@mentor.com>
---
 meta/classes/base.bbclass | 2 ++
 meta/conf/bitbake.conf    | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 53550ae..cc2b195 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -120,6 +120,8 @@ root_cleandirs() {
 python() {
     import re
 
+    d.setVar("SRCPV", "${@bb.fetch2.get_srcrev(d)}")
+
     for e in d.keys():
         flags = d.getVarFlags(e)
         if flags and flags.get('task'):
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index f421050..124bf49 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -36,6 +36,10 @@ PR = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}"
 PROVIDES = ""
 S = "${WORKDIR}/${P}"
 AUTOREV = "${@bb.fetch2.get_autorev(d)}"
+AUTOREV[vardepvalue] = "${SRCPV}"
+# Set Dynamically in base.bbclass
+# SRCPV = "${@bb.fetch2.get_srcrev(d)}"
+SRCPV[vardepvalue] = "${SRCPV}"
 SRC_URI = ""
 STAMPS_DIR ?= "${TMPDIR}/stamps"
 STAMP = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}/${PV}-${PR}"
-- 
2.34.1


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

end of thread, other threads:[~2023-05-08 17:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-12 10:17 [PATCH] meta/conf/bitbake.conf: enable SRCPV support for AUTOREV Srinuvasan Arjunan
2023-04-13  7:02 ` Jan Kiszka
2023-04-13  7:09   ` Srinuvasan Arjunan
2023-04-14  8:57     ` Srinuvasan Arjunan
2023-04-14  9:00       ` Jan Kiszka
2023-04-14  9:12         ` Srinuvasan Arjunan
2023-04-14  9:16           ` Jan Kiszka
2023-04-17 13:27             ` Srinuvasan Arjunan
2023-04-17 14:10               ` Jan Kiszka
2023-04-18  6:25                 ` Srinuvasan Arjunan
2023-04-18  7:06                 ` Uladzimir Bely
2023-04-19  2:40                   ` [PATCH v2] " Srinuvasan Arjunan
2023-04-19 13:43                     ` Jan Kiszka
2023-05-08 17:57                     ` Anton Mikanovich

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