Skip to contentSkip to conversation

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

PATCH Superseded Ming Liu 3 participants 4 messages Nov 8, 2025 – Nov 9, 2025

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Ming Liu

author
#0 lore raw

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

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
#1 lore raw
Quoted 9 lines · Ming Liu via lists.openembedded.org

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.

---

Hi Ming,

Thanks for your patch.

It looks like this is breaking some builds:

ERROR: iproute2-6.17.0-r0 do_package: QA Issue: iproute2: Files/directories were installed but not shipped in any package:
/usr/share
/usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/tc
/usr/share/bash-completion/completions/devlink
...
ERROR: systemd-1_258.1-r0 do_package: QA Issue: systemd: Files/directories were installed but not shipped in any package:
/usr/share/bash-completion/completions/userdbctl /usr/share/bash-completion/completions/systemd-id128
/usr/share/bash-completion/completions/bootctl
/usr/share/bash-completion/completions/systemd-run
/usr/share/bash-completion/completions/localectl
/usr/share/bash-completion/completions/journalctl /usr/share/bash-completion/completions/systemd-cgtop /usr/share/bash-completion/completions/systemd-nspawn /usr/share/bash-completion/completions/systemd-creds /usr/share/bash-completion/completions/systemctl /usr/share/bash-completion/completions/systemd-dissect /usr/share/bash-completion/completions/resolvectl
/usr/share/bash-completion/completions/machinectl /usr/share/bash-completion/completions/systemd-delta /usr/share/bash-completion/completions/systemd-path /usr/share/bash-completion/completions/systemd-analyze /usr/share/bash-completion/completions/loginctl
/usr/share/bash-completion/completions/busctl
/usr/share/bash-completion/completions/networkctl
/usr/share/bash-completion/completions/hostnamectl /usr/share/bash-completion/completions/systemd-cgls /usr/share/bash-completion/completions/kernel-install /usr/share/bash-completion/completions/systemd-cat /usr/share/bash-completion/completions/systemd-vpick /usr/share/bash-completion/completions/timedatectl /usr/share/bash-completion/completions/systemd-resolve /usr/share/bash-completion/completions/systemd-detect-virt /usr/share/bash-completion/completions/run0

https://autobuilder.yoctoproject.org/valkyrie/#/builders/20/builds/2669
https://autobuilder.yoctoproject.org/valkyrie/#/builders/11/builds/2667
https://autobuilder.yoctoproject.org/valkyrie/#/builders/65/builds/2687
https://autobuilder.yoctoproject.org/valkyrie/#/builders/74/builds/2679
https://autobuilder.yoctoproject.org/valkyrie/#/builders/78/builds/2722
https://autobuilder.yoctoproject.org/valkyrie/#/builders/99/builds/2684

Can you fix this issue?

Thanks,
Mathieu

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw
Quoted 69 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Mathieu Dubois-Briand via lists.openembedded.org
Sent: den 8 november 2025 15:01
To: [email protected]; [email protected]
Subject: Re: [OE-core] [PATCH] bash-completion.bbclass: put bash-completion package to PACKAGE_BEFORE_PN

Quoted 9 lines · Ming Liu via lists.openembedded.org

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.

---

Hi Ming,

Thanks for your patch.

It looks like this is breaking some builds:

ERROR: iproute2-6.17.0-r0 do_package: QA Issue: iproute2:
Files/directories were installed but not shipped in any package:
/usr/share
/usr/share/bash-completion /usr/share/bash-completion/completions /usr/share/bash-completion/completions/tc /usr/share/bash-completion/completions/devlink
...
ERROR: systemd-1_258.1-r0 do_package: QA Issue: systemd: Files/directories were installed but not shipped in any package:
/usr/share/bash-completion/completions/userdbctl /usr/share/bash-completion/completions/systemd-id128 /usr/share/bash-completion/completions/bootctl /usr/share/bash-completion/completions/systemd-run /usr/share/bash-completion/completions/localectl /usr/share/bash-completion/completions/journalctl /usr/share/bash-completion/completions/systemd-cgtop /usr/share/bash-completion/completions/systemd-nspawn /usr/share/bash-completion/completions/systemd-creds /usr/share/bash-completion/completions/systemctl /usr/share/bash-completion/completions/systemd-dissect /usr/share/bash-completion/completions/resolvectl /usr/share/bash-completion/completions/machinectl /usr/share/bash-completion/completions/systemd-delta /usr/share/bash-completion/completions/systemd-path /usr/share/bash-completion/completions/systemd-analyze /usr/share/bash-completion/completions/loginctl /usr/share/bash-completion/completions/busctl /usr/share/bash-completion/completions/networkctl /usr/share/bash-completion/completions/hostnamectl /usr/share/bash-completion/completions/systemd-cgls /usr/share/bash-completion/completions/kernel-install /usr/share/bash-completion/completions/systemd-cat /usr/share/bash-completion/completions/systemd-vpick /usr/share/bash-completion/completions/timedatectl /usr/share/bash-completion/completions/systemd-resolve /usr/share/bash-completion/completions/systemd-detect-virt /usr/share/bash-completion/completions/run0

https://autobuilder.yoctoproject.org/valkyrie/#/builders/20/builds/2669
https://autobuilder.yoctoproject.org/valkyrie/#/builders/11/builds/2667
https://autobuilder.yoctoproject.org/valkyrie/#/builders/65/builds/2687
https://autobuilder.yoctoproject.org/valkyrie/#/builders/74/builds/2679
https://autobuilder.yoctoproject.org/valkyrie/#/builders/78/builds/2722
https://autobuilder.yoctoproject.org/valkyrie/#/builders/99/builds/2684

Quoted 4 lines

Can you fix this issue?

Thanks,
Mathieu

It is common for recipes to assign to PACKAGE_BEFORE_PN using the = operator, and typically after having done the inherits. You will have to use PACKAGE_BEFORE_PN:append. Actually, you may as well use PACKAGES:prepend instead.

//Peter

author
#3 lore raw

Hi, Peter:

Thanks for the review, you are right, I will send a V2!

//Ming Liu

Peter Kjellerstedt <[email protected]> 於 2025年11月8日 週六 下午5:32寫道:

Quoted 87 lines
Quoted 2 lines

-----Original Message-----
From: [email protected] <

[email protected]> On Behalf Of Mathieu Dubois-Briand via lists.openembedded.org

Quoted 3 lines

Sent: den 8 november 2025 15:01
To: [email protected]; [email protected]
Subject: Re: [OE-core] [PATCH] bash-completion.bbclass: put

bash-completion package to PACKAGE_BEFORE_PN

Quoted 2 lines

On Sat Nov 8, 2025 at 12:37 PM CET, Ming Liu via lists.openembedded.org

Quoted 16 lines · wrote:
Quoted 9 lines

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.

---

Hi Ming,

Thanks for your patch.

It looks like this is breaking some builds:

Quoted 9 lines

ERROR: iproute2-6.17.0-r0 do_package: QA Issue: iproute2:
Files/directories were installed but not shipped in any package:
/usr/share
/usr/share/bash-completion /usr/share/bash-completion/completions /usr/share/bash-completion/completions/tc /usr/share/bash-completion/completions/devlink
...
ERROR: systemd-1_258.1-r0 do_package: QA Issue: systemd:

Files/directories

Quoted 37 lines

were installed but not shipped in any package:
/usr/share/bash-completion/completions/userdbctl /usr/share/bash-completion/completions/systemd-id128 /usr/share/bash-completion/completions/bootctl /usr/share/bash-completion/completions/systemd-run /usr/share/bash-completion/completions/localectl /usr/share/bash-completion/completions/journalctl /usr/share/bash-completion/completions/systemd-cgtop /usr/share/bash-completion/completions/systemd-nspawn /usr/share/bash-completion/completions/systemd-creds /usr/share/bash-completion/completions/systemctl /usr/share/bash-completion/completions/systemd-dissect /usr/share/bash-completion/completions/resolvectl /usr/share/bash-completion/completions/machinectl /usr/share/bash-completion/completions/systemd-delta /usr/share/bash-completion/completions/systemd-path /usr/share/bash-completion/completions/systemd-analyze /usr/share/bash-completion/completions/loginctl /usr/share/bash-completion/completions/busctl /usr/share/bash-completion/completions/networkctl /usr/share/bash-completion/completions/hostnamectl /usr/share/bash-completion/completions/systemd-cgls /usr/share/bash-completion/completions/kernel-install /usr/share/bash-completion/completions/systemd-cat /usr/share/bash-completion/completions/systemd-vpick /usr/share/bash-completion/completions/timedatectl /usr/share/bash-completion/completions/systemd-resolve /usr/share/bash-completion/completions/systemd-detect-virt /usr/share/bash-completion/completions/run0

https://autobuilder.yoctoproject.org/valkyrie/#/builders/20/builds/2669
https://autobuilder.yoctoproject.org/valkyrie/#/builders/11/builds/2667
https://autobuilder.yoctoproject.org/valkyrie/#/builders/65/builds/2687
https://autobuilder.yoctoproject.org/valkyrie/#/builders/74/builds/2679
https://autobuilder.yoctoproject.org/valkyrie/#/builders/78/builds/2722
https://autobuilder.yoctoproject.org/valkyrie/#/builders/99/builds/2684

Quoted 4 lines

Can you fix this issue?

Thanks,
Mathieu

It is common for recipes to assign to PACKAGE_BEFORE_PN using the = operator, and typically after having done the inherits. You will have to use PACKAGE_BEFORE_PN:append. Actually, you may as well use PACKAGES:prepend instead.

//Peter