diff mbox series

lib_package.bbclass: Use += to add to PACKAGE_BEFORE_PN

Message ID 20251203142038.730995-1-pkj@axis.com
State New
Headers show
Series lib_package.bbclass: Use += to add to PACKAGE_BEFORE_PN | expand

Commit Message

Peter Kjellerstedt Dec. 3, 2025, 2:20 p.m. UTC
The bash-completion bbclass recently started to use PACKAGE_BEFORE_PN to
add the ${PN}-bash-completion package. This meant that a recipe, e.g.,
proj in meta-oe, that inherits both bash-completion and lib_package
would fail since lib_package set PACKAGE_BEFORE_PN rather than added to
it.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---

Now, I have used += rather than :append here because I know RP's stance
on :append, and it also matches what bash-completion.bbclass does.
However, the comment seen below, indicates that ${PN}-bin is expected to
be after all other packages that want something from /usr/bin, i.e.,
last in PACKAGE_BEFORE_PN. Using :append would make it behave closer to
that (though not guarantee it).

 meta/classes-recipe/lib_package.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/lib_package.bbclass b/meta/classes-recipe/lib_package.bbclass
index 6d110155e5..2a944268c8 100644
--- a/meta/classes-recipe/lib_package.bbclass
+++ b/meta/classes-recipe/lib_package.bbclass
@@ -9,4 +9,4 @@ 
 # We need to allow the other packages to be greedy with what they
 # want out of /usr/bin and /usr/sbin before ${PN}-bin gets greedy.
 # 
-PACKAGE_BEFORE_PN = "${PN}-bin"
+PACKAGE_BEFORE_PN += "${PN}-bin"