* [PATCH 1/2] refactor: remove duplicate definition of BPN
2024-09-12 8:27 [PATCH 0/2] use BPN instead of PN for PP 'Cedric Hombourger' via isar-users
@ 2024-09-12 8:27 ` 'Cedric Hombourger' via isar-users
2024-09-12 8:27 ` [PATCH 2/2] dpkg: use BPN instead of PN when defining PP 'Cedric Hombourger' via isar-users
2024-09-19 13:17 ` [PATCH 0/2] use BPN instead of PN for PP Uladzimir Bely
2 siblings, 0 replies; 4+ messages in thread
From: 'Cedric Hombourger' via isar-users @ 2024-09-12 8:27 UTC (permalink / raw)
To: isar-users; +Cc: 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.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(-)
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
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20240912082741.354985-2-cedric.hombourger%40siemens.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] dpkg: use BPN instead of PN when defining PP
2024-09-12 8:27 [PATCH 0/2] use BPN instead of PN for PP 'Cedric Hombourger' via isar-users
2024-09-12 8:27 ` [PATCH 1/2] refactor: remove duplicate definition of BPN 'Cedric Hombourger' via isar-users
@ 2024-09-12 8:27 ` 'Cedric Hombourger' via isar-users
2024-09-19 13:17 ` [PATCH 0/2] use BPN instead of PN for PP Uladzimir Bely
2 siblings, 0 replies; 4+ messages in thread
From: 'Cedric Hombourger' via isar-users @ 2024-09-12 8:27 UTC (permalink / raw)
To: isar-users; +Cc: 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.
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
---
meta/classes/dpkg-base.bbclass | 2 +-
meta/classes/sbuild.bbclass | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 95cc830d..c97ee651 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -189,7 +189,7 @@ def get_package_srcdir(d):
# Each package should have its own unique build folder, so use
# recipe name as identifier
-PP = "/home/builder/${PN}"
+PP = "/home/builder/${BPN}"
PPS ?= "${@get_package_srcdir(d)}"
# Empty do_prepare_build() implementation, to be overwritten if needed
diff --git a/meta/classes/sbuild.bbclass b/meta/classes/sbuild.bbclass
index 9c268281..f68e8735 100644
--- a/meta/classes/sbuild.bbclass
+++ b/meta/classes/sbuild.bbclass
@@ -43,7 +43,7 @@ EOF
fstab_baseapt="${REPO_BASE_DIR} /base-apt none rw,bind,private 0 0"
grep -qxF "${fstab_baseapt}" ${sbuild_fstab} || echo "${fstab_baseapt}" >> ${sbuild_fstab}
- fstab_pkgdir="${WORKDIR} /home/builder/${PN} none rw,bind,private 0 0"
+ fstab_pkgdir="${WORKDIR} /home/builder/${BPN} none rw,bind,private 0 0"
grep -qxF "${fstab_pkgdir}" ${sbuild_fstab} || echo "${fstab_pkgdir}" >> ${sbuild_fstab}
if [ -d ${DL_DIR} ]; then
--
2.39.2
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20240912082741.354985-3-cedric.hombourger%40siemens.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] use BPN instead of PN for PP
2024-09-12 8:27 [PATCH 0/2] use BPN instead of PN for PP 'Cedric Hombourger' via isar-users
2024-09-12 8:27 ` [PATCH 1/2] refactor: remove duplicate definition of BPN 'Cedric Hombourger' via isar-users
2024-09-12 8:27 ` [PATCH 2/2] dpkg: use BPN instead of PN when defining PP 'Cedric Hombourger' via isar-users
@ 2024-09-19 13:17 ` Uladzimir Bely
2 siblings, 0 replies; 4+ messages in thread
From: Uladzimir Bely @ 2024-09-19 13:17 UTC (permalink / raw)
To: Cedric Hombourger, isar-users
On Thu, 2024-09-12 at 10:27 +0200, 'Cedric Hombourger' via isar-users
wrote:
> 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
>
Applied to next, thanks.
--
Best regards,
Uladzimir.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/1526ffdcbf339532f4a47addc7cdaacd3a5633ff.camel%40ilbers.de.
^ permalink raw reply [flat|nested] 4+ messages in thread