diff mbox series

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

Message ID 20251108113710.23299-1-liu.ming50@gmail.com
State New
Headers show
Series bash-completion.bbclass: put bash-completion package to PACKAGE_BEFORE_PN | expand

Commit Message

Ming Liu Nov. 8, 2025, 11:37 a.m. UTC
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.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
---
 meta/classes-recipe/bash-completion.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mathieu Dubois-Briand Nov. 8, 2025, 2 p.m. UTC | #1
On Sat Nov 8, 2025 at 12:37 PM CET, Ming Liu via lists.openembedded.org wrote:
> 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.
>
> Signed-off-by: Ming Liu <liu.ming50@gmail.com>
> ---

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
Peter Kjellerstedt Nov. 8, 2025, 4:31 p.m. UTC | #2
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Mathieu Dubois-Briand via lists.openembedded.org
> Sent: den 8 november 2025 15:01
> To: liu.ming50@gmail.com; openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH] bash-completion.bbclass: put bash-completion package to PACKAGE_BEFORE_PN
> 
> On Sat Nov 8, 2025 at 12:37 PM CET, Ming Liu via lists.openembedded.org wrote:
> > 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.
> >
> > Signed-off-by: Ming Liu <liu.ming50@gmail.com>
> > ---
> 
> 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

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
diff mbox series

Patch

diff --git a/meta/classes-recipe/bash-completion.bbclass b/meta/classes-recipe/bash-completion.bbclass
index b656e76c09..5371d3e625 100644
--- a/meta/classes-recipe/bash-completion.bbclass
+++ b/meta/classes-recipe/bash-completion.bbclass
@@ -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"