public inbox for bitbake-devel@lists.openembedded.org
 help / color / mirror / Atom feed
* [bitbake-devel][RFC] cookerdata: Include "originating" recipe data when parsing
@ 2025-10-30 14:19 Joshua Watt
  2025-10-30 17:09 ` Peter Kjellerstedt
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Joshua Watt @ 2025-10-30 14:19 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Joshua Watt

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



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-02-20 19:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox