From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7221105623410147328 X-Received: by 2002:a92:dccb:0:b0:32b:1e40:f0b2 with SMTP id b11-20020a92dccb000000b0032b1e40f0b2mr2886275ilr.6.1681799172091; Mon, 17 Apr 2023 23:26:12 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6602:2ac1:b0:760:bc59:ebd0 with SMTP id m1-20020a0566022ac100b00760bc59ebd0ls2391546iov.4.-pod-prod-gmail; Mon, 17 Apr 2023 23:26:11 -0700 (PDT) X-Google-Smtp-Source: AKy350bidMkrPEIWTj7atyjEICA2qErq3eCUEmIio2n55yQZ27zcNBgKg2MdXKd7Gkwh3Z5e/Fci X-Received: by 2002:a05:6602:110:b0:716:99e0:807f with SMTP id s16-20020a056602011000b0071699e0807fmr1118042iot.11.1681799171485; Mon, 17 Apr 2023 23:26:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681799171; cv=none; d=google.com; s=arc-20160816; b=AQV9xnoyDWeF25rx1W8oUp/4porls2MhebEy2O325BNPSsM8TJaw6uUvEe44kkvOp0 C2ImybaingaO0TxZqbrfbN8l8SRhHgEOFPf0CqgsieSDxI9FkaU/k0CPCC1sq1smnoFv BEKHzy2DyC93RNiD/GdDcf6zG5GfNg/UBcdGNEN1m+/N+VDEWPnc0vyIRGFkR7TxE+Nf Pq5Lpk1/+DR7iP4eJq57cxMcY0Ig88tCt7haDVBuh5QjR4YOM1eT6Yd+m9hUzrAMjRRG oQrXN15qV40L/0l9blMSO5LxgxKrADntwFFwmAeCg+3Jj0OfgufLtJ8gDIOgUg8sNRfr eG+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=wvpRGasaQUWtw9Yw7hDbQJ3+77pVZMfjsM3dSiA0n3o=; b=BNAuNpjae6FxWu0FKe7q9egYQDaM9foW+8Oc3CY56dPxmgHtdSIjovIEIT6xSTDg4U 6e5Cypxw75SB5lZBEVHd3nYruqd3sLByYL1+6Qi+hDehumYhl3SW4Yjru5LaJZHPYCzz tiygq9YPWHWdxgnNkKpDYCWyWHsoUlq+Uljbq1usfFYfyR2cy44t8Ps2EOZKC+fueeS6 kBUAX7D5XWQFBxUtIa81B7SbC87/Mw3Rw0+PxjxK8/FchVCyvBSTUfSILxScLdUJmoQv usFyN4wnKFF7rC7kvNepXxmrWoer0fyUyfan+Cy0qGf+WUMmcaJhoHyzbi8Hs6MCGeO9 hjqg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="c7/1Gopw"; spf=pass (google.com: domain of srinuvasanasv@gmail.com designates 2607:f8b0:4864:20::933 as permitted sender) smtp.mailfrom=srinuvasanasv@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-ua1-x933.google.com (mail-ua1-x933.google.com. [2607:f8b0:4864:20::933]) by gmr-mx.google.com with ESMTPS id cp28-20020a056638481c00b0040bc66b5636si652347jab.7.2023.04.17.23.26.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Apr 2023 23:26:11 -0700 (PDT) Received-SPF: pass (google.com: domain of srinuvasanasv@gmail.com designates 2607:f8b0:4864:20::933 as permitted sender) client-ip=2607:f8b0:4864:20::933; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="c7/1Gopw"; spf=pass (google.com: domain of srinuvasanasv@gmail.com designates 2607:f8b0:4864:20::933 as permitted sender) smtp.mailfrom=srinuvasanasv@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-ua1-x933.google.com with SMTP id az21so4885959uab.12 for ; Mon, 17 Apr 2023 23:26:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681799171; x=1684391171; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wvpRGasaQUWtw9Yw7hDbQJ3+77pVZMfjsM3dSiA0n3o=; b=c7/1GopwW42JZzGgBMizziWciHznQM8pfoa867uqTV5e1SEmriMcTTJ1rqhMWhSdK7 Wln+jt59Ro8dA9ceI4+2Hq1RH/I3fhOZg2leXLet9bohLXEoV7B4iVjcWZoKIlW/J+NO Dkx0Jh6bsEjvff5EOozU4/XdnE2fRBenm15sVA9jgPSUvzcFI/FT6cbpwDHs3J5UTH0m +NLDPMiUJKMqBsF98AYSHFMACSjYSEw5iRgUd8SpwogrAXJTx8V9T9TjzuxMxyf8qXrC 6bIIVLyE1uPdZTUIAWgu7AQ74kYlJrdTRaOBrPXgNavq3EAShjInO9pixMzujIilc/Py Z4sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681799171; x=1684391171; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wvpRGasaQUWtw9Yw7hDbQJ3+77pVZMfjsM3dSiA0n3o=; b=DLdOyvoaDBOhLvURl8TEPTRHiijpgPV2hOVXN1ZlmD95iJ3FP4kYzUcI4JCsrf8T1b SiI+FfOCkBO2YhB1E5hUThxzDso7/5ka8bdTM0EbOW8V0LonCi0Ad6jt9IFykaY/GRRJ +O+Yt9PHAWO/b51oj7krGmWquSGmS1meHEsQXQL1Y0nK19xtmW7YVAG0g/b5L2TVa8lN yPWklDVUFW5niBl5zUe5atpzx8YG6LPBsySqmn1HilcpoPQkvTgouFzCyTnfdwaRMmIR yMRMcj5Xszm1MhUE7o6pwur/wc1UuF0tR7v4O8oIyG78wv6MdU7n674wELwW0AxKPd8O fDcA== X-Gm-Message-State: AAQBX9fFYKjJNPPW93RsxBH1nDW3n7jPMo0Y2WwbFUvSi7kplvW4/vzk lywIrEjw0nFPj3i7h5DHmtU2Qsb9YlIX2EDfou8= X-Received: by 2002:a1f:a4cd:0:b0:43b:30a4:5bc1 with SMTP id n196-20020a1fa4cd000000b0043b30a45bc1mr9256009vke.2.1681799170520; Mon, 17 Apr 2023 23:26:10 -0700 (PDT) MIME-Version: 1.0 References: <526d9fd9-a8ab-ba29-d925-6c77afaaf985@siemens.com> <20230417132734.1023825-1-srinuvasan_a@mentor.com> <7c8c6715-0ecd-35ab-4865-9b549f833ccf@siemens.com> In-Reply-To: <7c8c6715-0ecd-35ab-4865-9b549f833ccf@siemens.com> From: Srinuvasan Arjunan Date: Tue, 18 Apr 2023 11:55:59 +0530 Message-ID: Subject: Re: [PATCH] meta/conf/bitbake.conf: enable SRCPV support for AUTOREV To: Jan Kiszka Cc: Srinuvasan Arjunan , isar-users@googlegroups.com Content-Type: multipart/alternative; boundary="000000000000247bd205f99662d9" X-TUID: RIAWwFvcczlR --000000000000247bd205f99662d9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 17, 2023 at 7:40=E2=80=AFPM 'Jan Kiszka' via isar-users < isar-users@googlegroups.com> wrote: > Make sure to always version your patches! > > On 17.04.23 15:27, Srinuvasan Arjunan wrote: > > From: Srinuvasan A > > > > One of our downstream project recipe uses `SRCREV =3D "${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 suppor= t > > as like OE. > > > > Signed-off-by: Srinuvasan A > > --- > > meta/classes/base.bbclass | 26 ++++++++++++++++++++++++++ > > meta/conf/bitbake.conf | 4 ++++ > > 2 files changed, 30 insertions(+) > > > > diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass > > index 53550ae..f631483 100644 > > --- a/meta/classes/base.bbclass > > +++ b/meta/classes/base.bbclass > > @@ -120,6 +120,32 @@ root_cleandirs() { > > python() { > > import re > > > > + needsrcrev =3D False > > + srcuri =3D d.getVar('SRC_URI') > > + for uri_string in srcuri.split(): > > + uri =3D bb.fetch.URI(uri_string) > > + # Svn packages should DEPEND on subversion-native > > The comments is not fully accurate for Isar (we are not building such > tools natively). Same below. > > > + if uri.scheme =3D=3D "svn": > > + needsrcrev =3D True > > + > > + # Git packages should DEPEND on git-native > > + elif uri.scheme in ("git", "gitsm"): > > + needsrcrev =3D True > > + > > + # Mercurial packages should DEPEND on mercurial-native > > + elif uri.scheme =3D=3D "hg": > > + needsrcrev =3D True > > + > > + # Perforce packages support SRCREV =3D "${AUTOREV}" > > + elif uri.scheme =3D=3D "p4": > > + needsrcrev =3D True > > + > > + elif uri.scheme =3D=3D "repo": > > + needsrcrev =3D True > > + > > + if needsrcrev: > > + d.setVar("SRCPV", "${@bb.fetch2.get_srcrev(d)}") > > + > > for e in d.keys(): > > flags =3D 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 =3D "${@bb.parse.vars_from_file(d.getVar('FILE', > False),d)[2] or 'r0'}" > > PROVIDES =3D "" > > S =3D "${WORKDIR}/${P}" > > AUTOREV =3D "${@bb.fetch2.get_autorev(d)}" > > +AUTOREV[vardepvalue] =3D "${SRCPV}" > > +# Set Dynamically in base.bbclass > > +# SRCPV =3D "${@bb.fetch2.get_srcrev(d)}" > > +SRCPV[vardepvalue] =3D "${SRCPV}" > > SRC_URI =3D "" > > STAMPS_DIR ?=3D "${TMPDIR}/stamps" > > STAMP =3D "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}/${PV}-${PR}" > > Except for the comments, this looks good to me now. > > Just wondering if we could somehow stress this path in Isar upstream as > well - though that should not block this fix for AUTOREV. > Stress this path meant, this one you are saying # Also check downloadfilename as the URL path might not be useful for sniffing path =3D uri.params.get("downloadfilename", uri.path) > > Jan > > -- > 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/7c8c6715-0ecd-35ab-4865-9b54= 9f833ccf%40siemens.com > . > --000000000000247bd205f99662d9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Apr 17, 2023 at 7:40=E2=80=AF= PM 'Jan Kiszka' via isar-users <isar-users@googlegroups.com> wrote:
Make sure to always version your = patches!

On 17.04.23 15:27, Srinuvasan Arjunan wrote:
> From: Srinuvasan A <srinuvasan_a@mentor.com>
>
> One of our downstream project recipe uses `SRCREV =3D "${AUTOREV}= "` to get
> the latest changes always, but this not works after bitbake 2 migratio= n,
> 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 s= upport
> as like OE.
>
> Signed-off-by: Srinuvasan A <srinuvasan_a@mentor.com>
> ---
>=C2=A0 meta/classes/base.bbclass | 26 ++++++++++++++++++++++++++
>=C2=A0 meta/conf/bitbake.conf=C2=A0 =C2=A0 |=C2=A0 4 ++++
>=C2=A0 2 files changed, 30 insertions(+)
>
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index 53550ae..f631483 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -120,6 +120,32 @@ root_cleandirs() {
>=C2=A0 python() {
>=C2=A0 =C2=A0 =C2=A0 import re
>=C2=A0
> +=C2=A0 =C2=A0 needsrcrev =3D False
> +=C2=A0 =C2=A0 srcuri =3D d.getVar('SRC_URI')
> +=C2=A0 =C2=A0 for uri_string in srcuri.split():
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 uri =3D bb.fetch.URI(uri_string)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 # Svn packages should DEPEND on subversio= n-native

The comments is not fully accurate for Isar (we are not building such
tools natively). Same below.

> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 if uri.scheme =3D=3D "svn":
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 needsrcrev =3D True
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 # Git packages should DEPEND on git-nativ= e
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 elif uri.scheme in ("git", &quo= t;gitsm"):
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 needsrcrev =3D True
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 # Mercurial packages should DEPEND on mer= curial-native
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 elif uri.scheme =3D=3D "hg": > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 needsrcrev =3D True
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 # Perforce packages support SRCREV =3D &q= uot;${AUTOREV}"
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 elif uri.scheme =3D=3D "p4": > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 needsrcrev =3D True
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 elif uri.scheme =3D=3D "repo":<= br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 needsrcrev =3D True
> +
> +=C2=A0 =C2=A0 if needsrcrev:
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 d.setVar("SRCPV", "${@bb.f= etch2.get_srcrev(d)}")
> +
>=C2=A0 =C2=A0 =C2=A0 for e in d.keys():
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 flags =3D d.getVarFlags(e)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 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 =3D "${@bb.parse.vars_from_file(d.getVar(&#= 39;FILE', False),d)[2] or 'r0'}"
>=C2=A0 PROVIDES =3D ""
>=C2=A0 S =3D "${WORKDIR}/${P}"
>=C2=A0 AUTOREV =3D "${@bb.fetch2.get_autorev(d)}"
> +AUTOREV[vardepvalue] =3D "${SRCPV}"
> +# Set Dynamically in base.bbclass
> +# SRCPV =3D "${@bb.fetch2.get_srcrev(d)}"
> +SRCPV[vardepvalue] =3D "${SRCPV}"
>=C2=A0 SRC_URI =3D ""
>=C2=A0 STAMPS_DIR ?=3D "${TMPDIR}/stamps"
>=C2=A0 STAMP =3D "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}/${P= V}-${PR}"

Except for the comments, this looks good to me now.

Just wondering if we could somehow stress this path in Isar upstream as
well - though that should not block this fix for AUTOREV.
<= div>
=C2=A0 =C2=A0 Stress this path meant, this one you are s= aying=C2=A0
=C2=A0 =C2=A0 # Also check downloadfilename as the UR= L path might not be useful for sniffing
=C2=A0 =C2=A0 path =3D ur= i.params.get("downloadfilename", uri.path)=C2=A0

Jan

--
Siemens AG, Technology
Competence Center Embedded Linux

--
You received this message because you are subscribed to the Google Groups &= quot;isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-= users/7c8c6715-0ecd-35ab-4865-9b549f833ccf%40siemens.com.
--000000000000247bd205f99662d9--