[OE-core] [PATCH] lttng-modules: Add missing SRCREV_FORMAT

Daniel Gomez daniel at qtec.com
Thu Sep 12 19:54:23 UTC 2019


When using devupstream class the SRCREV_FORMAT variable must be set.

Signed-off-by: Daniel Gomez <daniel at qtec.com>
---

When using class-devupstream, multiple SCMs are used. Therefore, it is needed
to select the variant of the recipe via PREFERRED_VERSION. In addition,
SRCREV_FORMAT variable must be set.

An example of devupstream class + SRCREV_FORMAT:
meta/recipes-kernel/linux/linux-yocto.inc

Error log:
ERROR: ExpansionError during parsing /workdir/repo/poky/meta/recipes-kernel/lttng/lttng-modules_2.10.10.bb
Traceback (most recent call last):
  File "Var <SRCPV>", line 1, in <module>
  File "/workdir/repo/poky/bitbake/lib/bb/fetch2/__init__.py", line 768, in get_srcrev(d=<bb.data_smart.DataSmart object at 0x7ffb7638add8>, method_name='sortable_revision'):
             raise FetchError("The SRCREV_FORMAT variable must be set when multiple SCMs are used.\n"\
    >                         "The SCMs are:\n%s" % '\n'.join(scms))

bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: The SRCREV_FORMAT variable must be set when multiple SCMs are used.
The SCMs are:
git://git.lttng.org/lttng-modules;branch=stable-2.10
git://git.lttng.org/lttng-modules.git;branch=stable-2.10

 meta/recipes-kernel/lttng/lttng-modules_2.10.10.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.10.10.bb b/meta/recipes-kernel/lttng/lttng-modules_2.10.10.bb
index 6e2d655495..dccc4b9842 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.10.10.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.10.10.bb
@@ -43,3 +43,4 @@ SRC_URI_class-devupstream = "git://git.lttng.org/lttng-modules;branch=stable-2.1
 SRCREV_class-devupstream = "624aca5d7507fbd11ea4a1a474c3aa1031bd9a31"
 PV_class-devupstream = "2.10.10+git${SRCPV}"
 S_class-devupstream = "${WORKDIR}/git"
+SRCREV_FORMAT ?= "lttng_git"
--
2.20.1



More information about the Openembedded-core mailing list