[1/2] refactor: remove duplicate definition of BPN

Message ID 20240912082741.354985-2-cedric.hombourger@siemens.com
State Under Review
Headers show
Series use BPN instead of PN for PP | expand

Commit Message

Cedric Hombourger Sept. 12, 2024, 8:27 a.m. UTC
BPN was defined both in the multiarch and sdk classes. With its
default/initial value being "${PN}", we may set it right after
defining PN in meta/conf/bitbake.conf

Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
---
 meta/classes/multiarch.bbclass | 2 --
 meta/classes/sdk.bbclass       | 1 -
 meta/conf/bitbake.conf         | 1 +
 3 files changed, 1 insertion(+), 3 deletions(-)

Patch

diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass
index 5c97453b..bb0f7983 100644
--- a/meta/classes/multiarch.bbclass
+++ b/meta/classes/multiarch.bbclass
@@ -3,8 +3,6 @@ 
 #
 # SPDX-License-Identifier: MIT
 
-BPN = "${PN}"
-
 inherit compat
 python() {
     # provide compat only when we can build it
diff --git a/meta/classes/sdk.bbclass b/meta/classes/sdk.bbclass
index 754fd4cd..ef9c03b2 100644
--- a/meta/classes/sdk.bbclass
+++ b/meta/classes/sdk.bbclass
@@ -9,7 +9,6 @@  inherit crossvars
 
 # hook up the -sdk image variant
 BBCLASSEXTEND = "sdk"
-BPN = "${PN}"
 
 python sdk_virtclass_handler() {
     pn = e.data.getVar('PN')
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index cda98035..13966a62 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -31,6 +31,7 @@  DEBSRCDIR = "${DL_DIR}/deb-src"
 P = "${PN}-${PV}"
 PF = "${PN}-${PV}-${PR}"
 PN = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
+BPN = "${PN}"
 PV = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
 PR = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}"
 PROVIDES = ""