[PATCH 0/2] use BPN instead of PN for PP

27 views
Skip to first unread message

Cedric Hombourger

unread,
Sep 12, 2024, 4:28:13 AM9/12/24
to isar-...@googlegroups.com, Cedric Hombourger
With 2ca3a7e5, sources are built only once and re-used when building
-native and -compat binary packages. The dpkg-raw class generates
a debian/rules file with ${PP}/image expanded: this causes build
of the -compat or -native variants to fail since /home/builder/${PN}
does not exist in the sbuild environment of -compat/-native.

Change the definition of PP to be /home/builder/${BPN} so that the
expanded value remains the same for all variants.

Having absolute paths in generated debian/rules files is obviously
questionable.


Cedric Hombourger (2):
refactor: remove duplicate definition of BPN
dpkg: use BPN instead of PN when defining PP

meta/classes/dpkg-base.bbclass | 2 +-
meta/classes/multiarch.bbclass | 2 --
meta/classes/sbuild.bbclass | 2 +-
meta/classes/sdk.bbclass | 1 -
meta/conf/bitbake.conf | 1 +
5 files changed, 3 insertions(+), 5 deletions(-)

--
2.39.2

Cedric Hombourger

unread,
Sep 12, 2024, 4:28:14 AM9/12/24
to isar-...@googlegroups.com, Cedric Hombourger
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.h...@siemens.com>
---
meta/classes/multiarch.bbclass | 2 --
meta/classes/sdk.bbclass | 1 -
meta/conf/bitbake.conf | 1 +
3 files changed, 1 insertion(+), 3 deletions(-)

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 = ""
--
2.39.2

Uladzimir Bely

unread,
Sep 19, 2024, 9:17:28 AM9/19/24
to Cedric Hombourger, isar-...@googlegroups.com
On Thu, 2024-09-12 at 10:27 +0200, 'Cedric Hombourger' via isar-users
wrote:
Applied to next, thanks.

--
Best regards,
Uladzimir.
Reply all
Reply to author
Forward
0 new messages