From patchwork Wed Apr 19 02:40:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinuvasan Arjunan X-Patchwork-Id: 2773 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 19 Apr 2023 04:41:02 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f63.google.com (mail-wm1-f63.google.com [209.85.128.63]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 33J2f1eQ028035 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Apr 2023 04:41:02 +0200 Received: by mail-wm1-f63.google.com with SMTP id 5b1f17b1804b1-3f08901fed3sf15907955e9.1; Tue, 18 Apr 2023 19:41:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1681872056; cv=pass; d=google.com; s=arc-20160816; b=zfFOD7fqj5El/d2372GvEkystmtOJsVaNlnRh5AFBtlHmuBG9Z3eQgd1OeFD0abOfW 6IHCLLuKA+vY7uBV3Q0JcDo+b7gfVWOh8LyeeOfIFWAVGQkfLf+7k1tbFdljEJVjcPbu Rc9ygo4VPFh1O/GJ+Bszrd1ziL4eR2aIoGmuDTDT4ZaI42RGCvXaMAhvc5trGFoaHeda Ug0cCfV+NR7YMrZ/gT9ui2Tx2cz0YC3VijsRyBxmJe+BLguEe/8e7TQi3yWejS0kXEGH SWPlzeCdTTg+8nYh4RC2z2F2mFrfK9bw7vHbxWuUo8775DsuNXYtWujzkzHSNdYoTQCl u5tg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:sender :dkim-signature; bh=3weFlMwabRP6flwOJk1JwGWSw4qBgW/zeWEXM2vQSWU=; b=nrJ1GAgulaz0HM20wXVLR0sxwzwjaDWRi/cVU0p34D4lCsBY4tAzOIh2XnVNcN+OHl leLvhgl1mcyZddaq8kYpTj7HNp+s4nunACJ60kfj0Mct2KiV3HRBLdp7PI5RUGA9rfb4 MhCHrKTr/qEmHWuo5TnnEZ9KWCfiqcYKo9tqCBkbTB7Hgnhe7gZrKwMQoncrY97yxWDz bZ1HVm8FcOsy4cFf5TE9Yxb95oXbybvjAwo+V1iWby0frsQnW8BxrW6P0PlhGXDuT0fb iMy8OkUXIRnZRk1reoq7qeMj4q7DO1WPmvqX2vtqkJLrUM1Nb1AAp+tLIkXkol8EjON0 Vxhw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of srinuvasan_a@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Srinuvasan_A@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1681872056; x=1684464056; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:ironport-sdr:sender:from:to:cc:subject:date :message-id:reply-to; bh=3weFlMwabRP6flwOJk1JwGWSw4qBgW/zeWEXM2vQSWU=; b=brJTPts9CZNGiJ9fwaCABEiU5WHFVg9MYYePA5En03wVUf/ZwA/OC5gJH7j57yaoHP CTLZ7dXEQokpoQvsdrNA5qx7n0Y3AnxIw70Lxmc0YPBCDcTv8yvf8XV1wVWqAVxjtVJx jB0nQLWmjmxAq4qOEPJ6RmU+ruzNV6uDoOx1BIkl8OaUhyQfw3euExJcMvMsvJQ9QTVz nBb/iwplU545lXi1vPtIfQ7yYcy0zYnfaAqHperBI5gcvqybwy/iGxlUHsp+au9wzuPk sphaz2vuwERMhcw13CWE9Vpkyi5QKkniUOVtTNWfWUEpGUOG1oMtTJX9ay/QpGQn/svZ zesQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681872056; x=1684464056; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:x-beenthere:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=3weFlMwabRP6flwOJk1JwGWSw4qBgW/zeWEXM2vQSWU=; b=Vz/cBzU0ECmu88dHG1/7GI9OlcGUBHXYmvhn+h3sVLGksprOCb4VJyc6f8AU+sczE+ CG4bhFnvndIuvVsAEQ17HUVNmggQ2pBW3MaYBUesivv4GzooULF9LOSdt0zFAUQ9U8TT abxKxbgFe8ZUfImI9p3MC3ArMQZOfILciVjbOguaUrRhhmePkwarieXp0EBwleI1yFsJ WU7aHoG9ikhnxnTyBqu4yF6m+XYTC0B0hj15y4n9FkVajh/k6Ua9pnXP31jsR67o3t7C ewDF7DBwc6C451Gi+jyWmFXtjQ3aNlRx+tdA3KUqaRIzEyPu8WGo+JQowd1SX8Ij7wp+ Y1Tw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AAQBX9eLBmQ/cnkGNqHnl8O6a6EEbR2gRzoICXPKpd1lEC5V9ZkUmnge uKGsOebRs19LRIyMXDFG+P0= X-Google-Smtp-Source: AKy350at90MsjMNBA0G+1v6Qr/DKpccLbABYE9r7W1CuWZQg80V+RfvQZNth+1pe5R3x/D/oaSsmfQ== X-Received: by 2002:a5d:4e07:0:b0:2e5:18d6:8648 with SMTP id p7-20020a5d4e07000000b002e518d68648mr797963wrt.6.1681872056205; Tue, 18 Apr 2023 19:40:56 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:450c:b0:3f1:71d2:94b5 with SMTP id t12-20020a05600c450c00b003f171d294b5ls284814wmo.1.-pod-control-gmail; Tue, 18 Apr 2023 19:40:55 -0700 (PDT) X-Received: by 2002:a05:600c:3507:b0:3f1:72d8:a1b1 with SMTP id h7-20020a05600c350700b003f172d8a1b1mr531688wmq.7.1681872054963; Tue, 18 Apr 2023 19:40:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681872054; cv=none; d=google.com; s=arc-20160816; b=IgrXfm2wPUjlNw/9Dgew+knCJFp6alG4/pBe7ZfQFzC8B4ofvozYIeJUkA11rN1kq2 rsGvhWhWOqHgtmeAflGDgLHD9wKlZaSJlwcwU46pOLeqK0m/C3luPlKLjSTKonFm8lKh rsQCJb6GAhJYpYD6kaF7CxZSkjjl0ttbO7xR9LJ6oXGSc/omBWXhpinQfaYOEMsaFZmR 21DJgZMsFRlwg5YvRDIrzW1rNhfFrfLQ4/TLuUY1gTdEp1HH+TMdP2v20pSfjCXohytV 2+2ymoClggOgl5cXRh3zwFwDy+L8lckWbXyZs+bwauXx5HAK8U1xgYllOULKB8PUAXfs T2qg== 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:ironport-sdr; bh=+dRnUvOGHKPhOYazA/HfexvW83Zoqjh+13DtiGX/0RA=; b=SMgD0AsaqBRGmpv/0NoyPAfmo5tdo0zlJpbva37/UsWq8hvnwsvZ2z2KcVUeFN2l8m QcNLkYP+6WVp91bq59HCkGlMKJWBupUQn6FKW3WT0wDmuXo2i4gwKDzld8oZyIKnoUNe hzlgD0/dOph5diLj9KtSJRlpOdWOGzaDa1tiUR2nHj6V22vzIHXklpa0lislrpn32E2A i9Af0lm+ur7TE3FlITPJGD66+dJHl3Tfk1+2jARgHVgz7R5XNUs8guPz+RIZu+wSJWqf d2ia3qyyrOwlupdgJfqN0FKv0qcY9/oJL+tze8JA+kTk7lQtzc9jHs44l5aLL08lY9bT CXMA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of srinuvasan_a@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Srinuvasan_A@mentor.com Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com. [68.232.137.252]) by gmr-mx.google.com with ESMTPS id p30-20020a05600c1d9e00b003f173302d8bsi35499wms.1.2023.04.18.19.40.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Apr 2023 19:40:54 -0700 (PDT) Received-SPF: pass (google.com: domain of srinuvasan_a@mentor.com designates 68.232.137.252 as permitted sender) client-ip=68.232.137.252; X-IronPort-AV: E=Sophos;i="5.99,208,1677571200"; d="scan'208";a="2866688" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 18 Apr 2023 18:40:52 -0800 IronPort-SDR: dJx68ueHRdG05mTwm+HGZJDuKBNZwY9HhGLkVsDQdrEyO+V6UvmK1KS1xK+GTvcyPs8E88SBMq kyAEzoWAwRtsV498c3UGLagZE8Dzzo1liRJHLKXGkVt4lUxvjjV9sUNCcj83B2yKrlFwyFTWTC 8M/p1R2Ekmj6+A4TCSeoL4lAHlOt80d6p45q9tU9DsgD3wXmBABYFrDHaX9cGXWblOkdWQUMvO cgl4L6j+Q5s27geTPBhfva92NqbJgoMaWZWBE4Eu7HGAdwfZcbi8sXQw2cIECuUKfYAX8fHOBI 93s= From: Srinuvasan Arjunan To: CC: , , Srinuvasan A Subject: [PATCH v2] meta/conf/bitbake.conf: enable SRCPV support for AUTOREV Date: Wed, 19 Apr 2023 08:10:32 +0530 Message-ID: <20230419024032.1263457-1-srinuvasan_a@mentor.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <12187664.O9o76ZdvQC@home> References: <12187664.O9o76ZdvQC@home> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-11.mgc.mentorg.com (147.34.90.211) To svr-orw-mbx-13.mgc.mentorg.com (147.34.90.213) X-Original-Sender: srinuvasan_a@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of srinuvasan_a@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Srinuvasan_A@mentor.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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 | 10 ++++++++++ meta/conf/bitbake.conf | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 53550ae..17bebe9 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -120,6 +120,16 @@ root_cleandirs() { python() { import re + needsrcrev = False + srcuri = d.getVar('SRC_URI') + for uri_string in srcuri.split(): + uri = bb.fetch.URI(uri_string) + if uri.scheme in ("svn", "git", "gitsm", "hg", "p4", "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}"