Skip to contentSkip to conversation

core-image, populate_sdk_base: Add zsh-completion-pkgs image feature

PATCH In review Adam Nilsson 5 participants 7 messages Oct 1, 2025 – Oct 8, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 core-image, populate_sdk_base: Add zsh-completion-pkgs image feature

From: Adam Nilsson <[email protected]>

Add a zsh-completion-pkgs image feature to install *-zsh-completion packages into an image. This is similar to the existing bash-completion-pkgs feature.

---
 meta/classes-recipe/core-image.bbclass        | 1 +
 meta/classes-recipe/populate_sdk_base.bbclass | 1 +
 2 files changed, 2 insertions(+)
meta/classes-recipe/core-image.bbclass +1 -0
index 4072e420c5..309a7c577b 100644
@@ -33,6 +33,7 @@
 #                         LICENSE_CREATE_PACKAGE="1" to be set when building packages too
 # - doc-pkgs            - documentation packages for all installed packages in the rootfs
 # - bash-completion-pkgs - bash-completion packages for recipes using bash-completion bbclass
+# - zsh-completion-pkgs - zsh-completion packages
 # - ptest-pkgs          - ptest packages for all ptest-enabled recipes
 # - read-only-rootfs    - tweaks an image to support read-only rootfs
 # - stateless-rootfs    - systemctl-native not run, image populated by systemd at runtime
meta/classes-recipe/populate_sdk_base.bbclass +1 -0
index 0c2fd26e6f..8e671cf28f 100644
@@ -24,6 +24,7 @@ COMPLEMENTARY_GLOB[dbg-pkgs] = '*-dbg'
 COMPLEMENTARY_GLOB[src-pkgs] = '*-src'
 COMPLEMENTARY_GLOB[ptest-pkgs] = '*-ptest ${MLPREFIX}ptest-runner'
 COMPLEMENTARY_GLOB[bash-completion-pkgs] = '*-bash-completion'
+COMPLEMENTARY_GLOB[zsh-completion-pkgs] = '*-zsh-completion'
 
 def complementary_globs(featurevar, d):
     all_globs = d.getVarFlags('COMPLEMENTARY_GLOB')
#1 lore raw
Quoted 6 lines · Adam Nilsson via lists.openembedded.org

From: Adam Nilsson <[email protected]>

Add a zsh-completion-pkgs image feature to install *-zsh-completion packages into an image. This is similar to the existing bash-completion-pkgs feature.

By my count there’s just three recipes in core that have -zsh-completion packages. Until it’s more common, I’d suggest putting the COMPLEMENTARY_GLOBS assignment in your own image recipe if you want to use it.

Cheers,
Ross

#2 lore raw
Quoted 10 lines · Ross Burton via lists.openembedded.org
Quoted 6 lines · Adam Nilsson via lists.openembedded.org

From: Adam Nilsson <[email protected]>

Add a zsh-completion-pkgs image feature to install *-zsh-completion packages into an image. This is similar to the existing bash-completion-pkgs feature.

By my count there’s just three recipes in core that have -zsh-completion packages. Until it’s more common, I’d suggest putting the COMPLEMENTARY_GLOBS assignment in your own image recipe if you want to use it.

It does help people using zsh as default shell and working with yocto SDKs.

Quoted 11 lines

Cheers,
Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#224503): https://lists.openembedded.org/g/openembedded-core/message/224503
Mute This Topic: https://lists.openembedded.org/mt/115536491/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw
Quoted 8 lines · Khem Raj
Quoted 5 lines · Ross Burton via lists.openembedded.org
Quoted 3 lines · Adam Nilsson via lists.openembedded.org

From: Adam Nilsson <[email protected]>

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Add a zsh-completion-pkgs image feature to install *-zsh-completion packages into an image. This is similar to the existing bash-completion-pkgs feature.

By my count there’s just three recipes in core that have -zsh-completion packages. Until it’s more common, I’d suggest putting the COMPLEMENTARY_GLOBS assignment in your own image recipe if you want to use it.

It does help people using zsh as default shell and working with yocto SDKs.

Does it though?

$ git grep FILES.*zsh-completion
meta/recipes-core/systemd/systemd_257.8.bb:FILES:${PN}-zsh-completion = "${datadir}/zsh/site-functions"
meta/recipes-devtools/patchelf/patchelf_0.18.0.bb:FILES:${PN}-zsh-completion = "${datadir}/zsh"
meta/recipes-kernel/kmod/kmod_34.2.bb:FILES:${PN}-zsh-completion = "${datadir}/zsh”

How many SDKs ship with nativesdk builds of systemd, patchelf, or kmod?

Ross

#4 lore raw
Quoted 28 lines

-----Original Message-----
From: Ross Burton <[email protected]>
Sent: den 7 oktober 2025 12:34
To: Khem Raj <[email protected]>
Cc: Adam X Nilsson <[email protected]>; [email protected]; Adam X Nilsson <[email protected]>; Peter Kjellerstedt <[email protected]>
Subject: Re: [OE-core] [PATCH v1] core-image, populate_sdk_base: Add zsh-completion-pkgs image feature

Quoted 11 lines · Khem Raj
Quoted 9 lines · Ross Burton via lists.openembedded.org
Quoted 6 lines · Adam Nilsson via lists.openembedded.org

From: Adam Nilsson <[email protected]>

Add a zsh-completion-pkgs image feature to install *-zsh-completion packages into an image. This is similar to the existing bash-completion-pkgs feature.

Quoted 6 lines
Quoted 4 lines

By my count there’s just three recipes in core that have -zsh- completion packages. Until it’s more common, I’d suggest putting the COMPLEMENTARY_GLOBS assignment in your own image recipe if you want to use it.

It does help people using zsh as default shell and working with yocto SDKs.

Does it though?

Quoted 8 lines
$ git grep FILES.*zsh-completion
meta/recipes-core/systemd/systemd_257.8.bb:FILES:${PN}-zsh-completion = "${datadir}/zsh/site-functions"
meta/recipes-devtools/patchelf/patchelf_0.18.0.bb:FILES:${PN}-zsh-completion = "${datadir}/zsh"
meta/recipes-kernel/kmod/kmod_34.2.bb:FILES:${PN}-zsh-completion = "${datadir}/zsh”

How many SDKs ship with nativesdk builds of systemd, patchelf, or kmod?

Ross

Please think outside OE-Core. Just because there are only three recipes in OE-Core that currently create zsh-completion packages, does not mean that it is not more common outside of OE-Core. Also, one recipe that could benefit from creating a zsh-completion package is bluez5, which currently has it disabled.

One of the main reasons I suggested Adam to send this patch upstream is for consistency. Since bash-completions-pkgs is a well established feature, I would expect the same possibility for others shells (which in our case happens to be zsh).

//Peter

#5 lore raw
Quoted 43 lines · Peter Kjellerstedt via lists.openembedded.org
Quoted 28 lines

-----Original Message-----
From: Ross Burton <[email protected]>
Sent: den 7 oktober 2025 12:34
To: Khem Raj <[email protected]>
Cc: Adam X Nilsson <[email protected]>; [email protected]; Adam X Nilsson <[email protected]>; Peter Kjellerstedt <[email protected]>
Subject: Re: [OE-core] [PATCH v1] core-image, populate_sdk_base: Add zsh-completion-pkgs image feature

Quoted 11 lines · Khem Raj
Quoted 9 lines · Ross Burton via lists.openembedded.org
Quoted 6 lines · Adam Nilsson via lists.openembedded.org

From: Adam Nilsson <[email protected]>

Add a zsh-completion-pkgs image feature to install *-zsh-completion packages into an image. This is similar to the existing bash-completion-pkgs feature.

Quoted 6 lines
Quoted 4 lines

By my count there’s just three recipes in core that have -zsh- completion packages.  Until it’s more common, I’d suggest putting the COMPLEMENTARY_GLOBS assignment in your own image recipe if you want to use it.

It does help people using zsh as default shell and working with yocto SDKs.

Does it though?

Quoted 8 lines
$ git grep FILES.*zsh-completion
meta/recipes-core/systemd/systemd_257.8.bb:FILES:${PN}-zsh-completion = "${datadir}/zsh/site-functions"
meta/recipes-devtools/patchelf/patchelf_0.18.0.bb:FILES:${PN}-zsh-completion = "${datadir}/zsh"
meta/recipes-kernel/kmod/kmod_34.2.bb:FILES:${PN}-zsh-completion = "${datadir}/zsh”

How many SDKs ship with nativesdk builds of systemd, patchelf, or kmod?

Ross

Please think outside OE-Core. Just because there are only three recipes in OE-Core that currently create zsh-completion packages, does not mean that it is not more common outside of OE-Core. Also, one recipe that could benefit from creating a zsh-completion package is bluez5, which currently has it disabled.

Quoted 4 lines

One of the main reasons I suggested Adam to send this patch upstream is for consistency. Since bash-completions-pkgs is a well established feature, I would expect the same possibility for others shells (which in our case happens to be zsh).

I'm not sure we should have let the bash-completions one in. Now that we have, we have the inevitable followups and this is why I worry a lot about precedent when merging patches as people do use it against me later.

One the one hand, it is a trivial patch. On the other, we have key features like dev packages and dbg packages being mixed with much lower priority things like shell completion. This makes it harder for new users to find the important takeaways from the less important ones.

I really don't know what to do with the patch. I'm not particularly keen on it and my first impression was no, equally, I'm burnt out and really don't have the time/energy to write long emails arguing points about it.

Cheers,

Richard

#6 lore raw
Quoted 61 lines

-----Original Message-----
From: Richard Purdie <[email protected]>
Sent: den 7 oktober 2025 14:42
To: Peter Kjellerstedt <[email protected]>; Ross Burton <[email protected]>; Khem Raj <[email protected]>
Cc: Adam X Nilsson <[email protected]>; [email protected]
Subject: Re: [OE-core] [PATCH v1] core-image, populate_sdk_base: Add zsh-completion-pkgs image feature

Quoted 43 lines · Peter Kjellerstedt via lists.openembedded.org
Quoted 28 lines

-----Original Message-----
From: Ross Burton <[email protected]>
Sent: den 7 oktober 2025 12:34
To: Khem Raj <[email protected]>
Cc: Adam X Nilsson <[email protected]>; [email protected]; Adam X Nilsson <[email protected]>; Peter Kjellerstedt <[email protected]>
Subject: Re: [OE-core] [PATCH v1] core-image, populate_sdk_base: Add zsh-completion-pkgs image feature

Quoted 11 lines · Khem Raj
Quoted 9 lines · Ross Burton via lists.openembedded.org
Quoted 6 lines · Adam Nilsson via lists.openembedded.org

From: Adam Nilsson <[email protected]>

Add a zsh-completion-pkgs image feature to install *-zsh-completion packages into an image. This is similar to the existing bash-completion-pkgs feature.

Quoted 6 lines
Quoted 4 lines

By my count there’s just three recipes in core that have -zsh- completion packages.  Until it’s more common, I’d suggest putting the COMPLEMENTARY_GLOBS assignment in your own image recipe if you want to use it.

It does help people using zsh as default shell and working with yocto SDKs.

Does it though?

Quoted 8 lines
$ git grep FILES.*zsh-completion
meta/recipes-core/systemd/systemd_257.8.bb:FILES:${PN}-zsh-completion = "${datadir}/zsh/site-functions"
meta/recipes-devtools/patchelf/patchelf_0.18.0.bb:FILES:${PN}-zsh-completion = "${datadir}/zsh"
meta/recipes-kernel/kmod/kmod_34.2.bb:FILES:${PN}-zsh-completion = "${datadir}/zsh”

How many SDKs ship with nativesdk builds of systemd, patchelf, or kmod?

Ross

Please think outside OE-Core. Just because there are only three recipes in OE-Core that currently create zsh-completion packages, does not mean that it is not more common outside of OE-Core. Also, one recipe that could benefit from creating a zsh-completion package is bluez5, which currently has it disabled.

Quoted 4 lines

One of the main reasons I suggested Adam to send this patch upstream is for consistency. Since bash-completions-pkgs is a well established feature, I would expect the same possibility for others shells (which in our case happens to be zsh).

I'm not sure we should have let the bash-completions one in. Now that we have, we have the inevitable followups and this is why I worry a lot about precedent when merging patches as people do use it against me later.

Quoted 4 lines

One the one hand, it is a trivial patch. On the other, we have key features like dev packages and dbg packages being mixed with much lower priority things like shell completion. This makes it harder for new users to find the important takeaways from the less important ones.

To me, this sounds like a situation we should be able to improve by having better descriptions of the features in the core-image.bbclass. I have sent a patch series that I think does this. I do not know if it will sway your position about accepting the zsh-completion-pkgs feature, but it was worth a try. (The patch series is in four parts to separate the different changes I did, but it may be easier to just look at the resulting file after they are all applied.)

Quoted 9 lines

I really don't know what to do with the patch. I'm not particularly keen on it and my first impression was no, equally, I'm burnt out and really don't have the time/energy to write long emails arguing points about it.

Cheers,

Richard

//Peter