From: Joshua Watt <jpewhacker@gmail.com>
To: bitbake-devel@lists.openembedded.org
Cc: Joshua Watt <JPEWhacker@gmail.com>
Subject: [bitbake-devel][RFC] cookerdata: Include "originating" recipe data when parsing
Date: Thu, 30 Oct 2025 08:19:04 -0600 [thread overview]
Message-ID: <20251030141904.69494-1-JPEWhacker@gmail.com> (raw)
Parse out PN, PV, and PR from the "originating" recipe (the .bb file
being parsed) and provide them at parse time. This allows .bbappends,
.inc, etc. files to know what recipe is currently being parsed.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
lib/bb/cookerdata.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index 65c153a5b..8abf5e56e 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -504,6 +504,12 @@ class CookerDataBuilder(object):
bb_data.setVar("__BBMULTICONFIG", mc)
bb_data.setVar("FILE_LAYERNAME", layername)
+ pn, pv, pr = bb.parse.vars_from_file(bbfile, bb_data)
+
+ bb_data.setVar("ORIG_PN", pn or "defaultpkgname")
+ bb_data.setVar("ORIG_PV", pv or "1.0")
+ bb_data.setVar("ORIG_PR", pr or "r0")
+
bbfile_loc = os.path.abspath(os.path.dirname(bbfile))
bb.parse.cached_mtime_noerror(bbfile_loc)
--
2.51.1
next reply other threads:[~2025-10-30 14:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 14:19 Joshua Watt [this message]
2025-10-30 17:09 ` [bitbake-devel][RFC] cookerdata: Include "originating" recipe data when parsing 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 ` [bitbake-devel][PATCH v2] cookerdata: Include "originating" recipe name when parsing Joshua Watt
2026-02-19 16:32 ` 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=20251030141904.69494-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