On Fri, Apr 14, 2023 at 2:30 PM 'Jan Kiszka' via isar-users <isar-users@googlegroups.com> wrote:
On 14.04.23 10:57, Srinuvasan Arjunan wrote:
> 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 | 4 ++++
>  meta/conf/bitbake.conf    | 4 ++++
>  2 files changed, 8 insertions(+)
>
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index 53550ae..819f8a2 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -120,6 +120,10 @@ root_cleandirs() {
>  python() {
>      import re

> +    srcuri = d.getVar('SRC_URI')
> +    if srcuri:
> +        d.setVar("SRCPV", "${@bb.fetch2.get_srcrev(d)}")
> +

Still not the logic that OE uses - why?

Jan
 
  I thought it would be enable when SRC_URI contains any SCM
  They have a logic like get the uri and validating the uri.scheme against with many SCM , and set the needsrcrev variable if needed
  f.e : git
 
if uri.scheme in ("git", "gitsm"):
            needsrcrev = True

 Would we need to check like this?

--
Siemens AG, Technology
Competence Center Embedded Linux

--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/b58e37e2-00db-d2db-9955-cdcce8ae3f26%40siemens.com.