Skip to contentSkip to conversation

bash-completion.bbclass: put bash-completion package to PACKAGE_BEFORE_PN

PATCH New Ming Liu 1 participant 4 messages Nov 22, 2025

lore
Share & tools
lore

Ming Liu

author
#0 lore raw

v3 cover bash-completion.bbclass: put bash-completion package to PACKAGE_BEFORE_PN

Changes in V3:

1 Use PACKAGE_BEFORE_PN instead prepending to PACKAGES. 2 Fix build errors in other recipes that caused by this change.

Ming Liu (3):
systemd: use "+=" to set PACKAGE_BEFORE_PN
iproute2: use "+=" to set PACKAGE_BEFORE_PN bash-completion.bbclass: put bash-completion package to
PACKAGE_BEFORE_PN

 meta/classes-recipe/bash-completion.bbclass           | 2 +-
 meta/recipes-connectivity/iproute2/iproute2_6.16.0.bb | 2 +-
 meta/recipes-core/systemd/systemd_257.8.bb            | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH v3 1/3 systemd: use "+=" to set PACKAGE_BEFORE_PN

This avoid overridding the original PACKAGE_BEFORE_PN value could be set in bbclasses.

---
 meta/recipes-core/systemd/systemd_257.8.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_257.8.bb +1 -1
index 549eb7fb29..20fe77fb13 100644
@@ -412,7 +412,7 @@ python populate_packages:prepend (){
 }
 PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
 
-PACKAGE_BEFORE_PN = "\
+PACKAGE_BEFORE_PN += "\
     ${PN}-analyze \
     ${PN}-binfmt \
     ${PN}-container \
Signature · 1 line
2.43.0
author
#2 lore raw

PATCH v3 2/3 iproute2: use "+=" to set PACKAGE_BEFORE_PN

In reply to Ming Liu

This avoid overridding the original PACKAGE_BEFORE_PN value could be set in bbclasses.

---
 meta/recipes-connectivity/iproute2/iproute2_6.16.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/iproute2/iproute2_6.16.0.bb +1 -1
index dc7106902c..019f82a196 100644
@@ -80,7 +80,7 @@ IPROUTE2_PACKAGES =+ "\
     ${PN}-rdma \
 "
 
-PACKAGE_BEFORE_PN = "${IPROUTE2_PACKAGES}"
+PACKAGE_BEFORE_PN += "${IPROUTE2_PACKAGES}"
 RDEPENDS:${PN} += "${PN}-ip"
 
 FILES:${PN}-tc = "${base_sbindir}/tc* \
Signature · 1 line
2.43.0
author
#3 lore raw

PATCH v3 3/3 bash-completion.bbclass: put bash-completion package to PACKAGE_BEFORE_PN

In reply to Ming Liu

It was observed when FILES:${PN} contains "${sysconfdir}" or "${datadir}", the bash-completion files wont be installed to bash-completion package.

Fix it by putting bash-completion package to PACKAGE_BEFORE_PN, this ensures bash-completion package get the files packaged before PN.

---
 meta/classes-recipe/bash-completion.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/bash-completion.bbclass +1 -1
index b656e76c09..5371d3e625 100644
@@ -6,7 +6,7 @@
 
 DEPENDS:append:class-target = " bash-completion"
 
-PACKAGES += "${PN}-bash-completion"
+PACKAGE_BEFORE_PN += "${PN}-bash-completion"
 
 FILES:${PN}-bash-completion = "${datadir}/bash-completion ${sysconfdir}/bash_completion.d"
 
Signature · 1 line
2.43.0