public inbox for bitbake-devel@lists.openembedded.org
 help / color / mirror / Atom feed
From: Joshua Watt <jpewhacker@gmail.com>
To: bitbake-devel@lists.openembedded.org
Cc: Joshua Watt <JPEWhacker@gmail.com>
Subject: [bitbake-devel][PATCH v2] cookerdata: Include "originating" recipe name when parsing
Date: Fri, 19 Dec 2025 15:36:20 -0700	[thread overview]
Message-ID: <20251219223620.2222861-1-JPEWhacker@gmail.com> (raw)
In-Reply-To: <20251030141904.69494-1-JPEWhacker@gmail.com>

When a bbappend file is parsed, the FILE variable is set to the name of
the actual file being parsed (e.g. the name of the bbappend). Since
PN/PV etc. are derived from FILE, this means that they can be
misleading in the event that bbappend is using wildcards (e.g. PV might
have the value of "%" instead of the actual version number).

In order to allow bbappends to derived the actual information of the
recipe, capture the name of the original recipe being parsed as
ORIG_FILE when parsing a new recipe.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 lib/bb/cookerdata.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index 22ac95eac..fe41bb3bf 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -512,6 +512,8 @@ class CookerDataBuilder(object):
         bb_data.setVar("__BBMULTICONFIG", mc)
         bb_data.setVar("FILE_LAYERNAME", layername)
 
+        bb_data.setVar("ORIG_FILE", bbfile)
+
         bbfile_loc = os.path.abspath(os.path.dirname(bbfile))
         bb.parse.cached_mtime_noerror(bbfile_loc)
 
-- 
2.52.0



  parent reply	other threads:[~2025-12-19 22:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-30 14:19 [bitbake-devel][RFC] cookerdata: Include "originating" recipe data when parsing Joshua Watt
2025-10-30 17:09 ` Peter Kjellerstedt
2025-10-30 17:13   ` Joshua Watt
2025-10-30 21:30 ` [bitbake-devel][PATCH] toaster: support bitbake-setup Reyna, David
     [not found] ` <18736230F0A57013.18972@lists.openembedded.org>
2025-11-12  8:27   ` [bitbake-devel][PATCH] toaster: remove dependency on poky distro Reyna, David
2025-12-19 22:36 ` Joshua Watt [this message]
2026-02-19 16:32   ` [bitbake-devel][PATCH v2] cookerdata: Include "originating" recipe name when parsing Richard Purdie
2026-02-19 16:39     ` Joshua Watt
2026-02-19 16:55       ` Richard Purdie
2026-02-19 16:57         ` Joshua Watt
2026-02-20 19:58   ` [bitbake-devel][PATCH v3] " Joshua Watt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251219223620.2222861-1-JPEWhacker@gmail.com \
    --to=jpewhacker@gmail.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox