From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7221105623410147328 X-Received: by 2002:a92:d4d0:0:b0:328:4e63:795f with SMTP id o16-20020a92d4d0000000b003284e63795fmr8180339ilm.0.1681801603808; Tue, 18 Apr 2023 00:06:43 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a6b:b492:0:b0:761:3f80:35c9 with SMTP id d140-20020a6bb492000000b007613f8035c9ls856563iof.6.-pod-prod-gmail; Tue, 18 Apr 2023 00:06:43 -0700 (PDT) X-Google-Smtp-Source: AKy350aTRxhsYXPhfOg2EX+80g70xW5rYrV9vSh/ugAmuA7EvjURwx9p7/HLf+HOwroZvEB1AqAA X-Received: by 2002:a6b:e618:0:b0:760:ebae:4f8d with SMTP id g24-20020a6be618000000b00760ebae4f8dmr1057505ioh.8.1681801602963; Tue, 18 Apr 2023 00:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681801602; cv=none; d=google.com; s=arc-20160816; b=MR8UkhAtFblXEjO16exr1dvw7/lngUXsE71H5eZEO/FKML8FgQ6fUMMT7hr+H+tsYJ +c2EzHVTisnzENTGr56UeZlGedO/4ccXSq3vIFQXYerW72Hz3L4rguRLYanQSM64HCF5 MjZkdHGoZIi/5338JZjrkhShNBUfOIv4kRv37+4FN5jKR5a5+AXkGoyTDbailGwsZ6nX U7Z0B3j39zCKKYDwvvy0uUEhLzlRpr96w+MOBVLvj3QZKq6WVZaXBHoYn/WPqyB1oM2I jipVGCeKCu2h3huaz0XNFEcNF2pgxolysxm86ZlmUnfACPOLeF4BkZJ3kLmAWHgFdQ6P nd4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=WlFpRTl/tFfF40t0pRZlmlHYVKrQDo0+9QGGit4o1dY=; b=LyTr2OeXYBH9I+fivUFgDmfyQPUdlo6Oakencc3CgiKaiyMiw+AHM/Knk6ECdPHMl/ PVEZz7+PQAxeDlCAehsAjV4XNWkTvTUnw1q6ufnEHPjbOVNDrTmmTx/Da8YxDIph86is k3y5uLKWAMz//3axiJHDnNCG7oAss/HqOiKVqpwDJyiHMhgCSEZeC3pMks2TpSKbL5Y4 pV+BAsy3ccjBFBCfdnn+C5wD6cUmBr2bl8Ck3x11WMTJsX0tTM/vAiRp7OkVR5ilnCkg k4i2RtVwjjdJIpBQeGB5Nu1Msk9gczMtQ7C8SOjlkXo2lszR/Ltbc1y6EbCC80OXuRni QJHA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id h27-20020a056638339b00b0040fa7700d64si270162jav.4.2023.04.18.00.06.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Apr 2023 00:06:42 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from home.localnet (44-208-124-178-static.mgts.by [178.124.208.44] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 33I76aGq024054 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Apr 2023 09:06:36 +0200 From: Uladzimir Bely To: Srinuvasan Arjunan , isar-users@googlegroups.com Cc: Jan Kiszka Subject: Re: [PATCH] meta/conf/bitbake.conf: enable SRCPV support for AUTOREV Date: Tue, 18 Apr 2023 10:06:32 +0300 Message-ID: <12187664.O9o76ZdvQC@home> In-Reply-To: <7c8c6715-0ecd-35ab-4865-9b549f833ccf@siemens.com> References: <526d9fd9-a8ab-ba29-d925-6c77afaaf985@siemens.com> <20230417132734.1023825-1-srinuvasan_a@mentor.com> <7c8c6715-0ecd-35ab-4865-9b549f833ccf@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: l8RdVrOIfXSQ In the email from Monday, 17 April 2023 17:10:03 +03 user 'Jan Kiszka' via isar-users 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 = "${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 > > --- > > 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 = False > > + srcuri = d.getVar('SRC_URI') > > + for uri_string in srcuri.split(): > > + uri = 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 comments below are to be removed, it would be probably better to collapse all the stuff to if uri.scheme in ("svn", "git", "gitsm", "hg", "p4", "repo"): needsrcrev = True > > + if uri.scheme == "svn": > > + needsrcrev = True > > + > > + # Git packages should DEPEND on git-native > > + elif uri.scheme in ("git", "gitsm"): > > + needsrcrev = True > > + > > + # Mercurial packages should DEPEND on mercurial-native > > + elif uri.scheme == "hg": > > + needsrcrev = True > > + > > + # Perforce packages support SRCREV = "${AUTOREV}" > > + elif uri.scheme == "p4": > > + needsrcrev = True > > + > > + elif uri.scheme == "repo": > > + needsrcrev = True > > + > > + if needsrcrev: > > + 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}" > > 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. > > Jan > >