All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] bitbake.conf: Add base package version (BPV) variable
@ 2022-03-30  8:16 Stefan Herbrechtsmeier
  2022-03-30  8:41 ` [OE-core] " Alexander Kanavin
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Stefan Herbrechtsmeier @ 2022-03-30  8:16 UTC (permalink / raw)
  To: openembedded-core; +Cc: Stefan Herbrechtsmeier

From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>

Add a base package version (BPV) variable and use it as default for the
package version (PV) variable. The BPV variable contains the base
package version of the recipe read from the recipe filename.

The base package version variable supports an expansion of the version
from the recipe filename without the need of an immediate variable
expansion:
    PV = "${BPV}+git${SRCPV}"

It allows the inclusion of include files inside a recipe file with the
same version in the recipe and include filename even if the package
version is different to the base package version in the filename:
    require linux-yocto-${BPV}.inc

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>

---

 meta/conf/bitbake.conf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 7705415a4f..d56cf811ba 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -232,7 +232,8 @@ ASSUME_PROVIDED = "\
 ##################################################################
 
 PN = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
-PV = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
+BPV = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
+PV = "${BPV}"
 PR = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}"
 PE = ""
 PF = "${PN}-${EXTENDPE}${PV}-${PR}"
-- 
2.30.2



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

end of thread, other threads:[~2022-03-31  7:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-30  8:16 [RFC PATCH] bitbake.conf: Add base package version (BPV) variable Stefan Herbrechtsmeier
2022-03-30  8:41 ` [OE-core] " Alexander Kanavin
2022-03-30  8:41   ` Alexander Kanavin
2022-03-30 11:42   ` Stefan Herbrechtsmeier
2022-03-30 11:46     ` Alexander Kanavin
2022-03-30 11:51 ` Richard Purdie
2022-03-30 16:23   ` Stefan Herbrechtsmeier
2022-03-30 17:32 ` Khem Raj
2022-03-31  7:15   ` Stefan Herbrechtsmeier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.