| Message ID | 20251001160212.2588471-1-Adam.X.Nilsson@axis.com |
|---|---|
| State | Accepted, archived |
| Commit | c2d4228197ed0d0d00bb464237fa151a928eba76 |
| Headers | show |
| Series | [v1] core-image, populate_sdk_base: Add zsh-completion-pkgs image feature | expand |
On 1 Oct 2025, at 17:02, Adam Nilsson via lists.openembedded.org <Adam.X.Nilsson=axis.com@lists.openembedded.org> wrote: > > From: Adam Nilsson <adamni@axis.com> > > 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
On Mon, Oct 6, 2025 at 1:10 PM Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote: > > On 1 Oct 2025, at 17:02, Adam Nilsson via lists.openembedded.org <Adam.X.Nilsson=axis.com@lists.openembedded.org> wrote: > > > > From: Adam Nilsson <adamni@axis.com> > > > > 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. > > 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: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On 6 Oct 2025, at 22:28, Khem Raj <raj.khem@gmail.com> wrote: > > On Mon, Oct 6, 2025 at 1:10 PM Ross Burton via lists.openembedded.org > <ross.burton=arm.com@lists.openembedded.org> wrote: >> >> On 1 Oct 2025, at 17:02, Adam Nilsson via lists.openembedded.org <Adam.X.Nilsson=axis.com@lists.openembedded.org> wrote: >>> >>> From: Adam Nilsson <adamni@axis.com> >>> >>> 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
> -----Original Message----- > From: Ross Burton <Ross.Burton@arm.com> > Sent: den 7 oktober 2025 12:34 > To: Khem Raj <raj.khem@gmail.com> > Cc: Adam X Nilsson <Adam.X.Nilsson@axis.com>; openembedded-core@lists.openembedded.org; Adam X Nilsson <Adam.X.Nilsson@axis.com>; Peter Kjellerstedt <peter.kjellerstedt@axis.com> > Subject: Re: [OE-core] [PATCH v1] core-image, populate_sdk_base: Add zsh-completion-pkgs image feature > > On 6 Oct 2025, at 22:28, Khem Raj <raj.khem@gmail.com> wrote: > > > > On Mon, Oct 6, 2025 at 1:10 PM Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote: > >> > >> On 1 Oct 2025, at 17:02, Adam Nilsson via lists.openembedded.org <Adam.X.Nilsson=axis.com@lists.openembedded.org> wrote: > >>> > >>> From: Adam Nilsson <adamni@axis.com> > >>> > >>> 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 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
On Tue, 2025-10-07 at 11:48 +0000, Peter Kjellerstedt via lists.openembedded.org wrote: > > -----Original Message----- > > From: Ross Burton <Ross.Burton@arm.com> > > Sent: den 7 oktober 2025 12:34 > > To: Khem Raj <raj.khem@gmail.com> > > Cc: Adam X Nilsson <Adam.X.Nilsson@axis.com>; openembedded-core@lists.openembedded.org; Adam X Nilsson <Adam.X.Nilsson@axis.com>; Peter Kjellerstedt <peter.kjellerstedt@axis.com> > > Subject: Re: [OE-core] [PATCH v1] core-image, populate_sdk_base: Add zsh-completion-pkgs image feature > > > > On 6 Oct 2025, at 22:28, Khem Raj <raj.khem@gmail.com> wrote: > > > > > > On Mon, Oct 6, 2025 at 1:10 PM Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote: > > > > > > > > On 1 Oct 2025, at 17:02, Adam Nilsson via lists.openembedded.org <Adam.X.Nilsson=axis.com@lists.openembedded.org> wrote: > > > > > > > > > > From: Adam Nilsson <adamni@axis.com> > > > > > > > > > > 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 > > 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). 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
> -----Original Message----- > From: Richard Purdie <richard.purdie@linuxfoundation.org> > Sent: den 7 oktober 2025 14:42 > To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Ross Burton <Ross.Burton@arm.com>; Khem Raj <raj.khem@gmail.com> > Cc: Adam X Nilsson <Adam.X.Nilsson@axis.com>; openembedded-core@lists.openembedded.org > Subject: Re: [OE-core] [PATCH v1] core-image, populate_sdk_base: Add zsh-completion-pkgs image feature > > On Tue, 2025-10-07 at 11:48 +0000, Peter Kjellerstedt via lists.openembedded.org wrote: > > > -----Original Message----- > > > From: Ross Burton <Ross.Burton@arm.com> > > > Sent: den 7 oktober 2025 12:34 > > > To: Khem Raj <raj.khem@gmail.com> > > > Cc: Adam X Nilsson <Adam.X.Nilsson@axis.com>; openembedded-core@lists.openembedded.org; Adam X Nilsson <Adam.X.Nilsson@axis.com>; Peter Kjellerstedt <peter.kjellerstedt@axis.com> > > > Subject: Re: [OE-core] [PATCH v1] core-image, populate_sdk_base: Add zsh-completion-pkgs image feature > > > > > > On 6 Oct 2025, at 22:28, Khem Raj <raj.khem@gmail.com> wrote: > > > > > > > > On Mon, Oct 6, 2025 at 1:10 PM Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote: > > > > > > > > > > On 1 Oct 2025, at 17:02, Adam Nilsson via lists.openembedded.org <Adam.X.Nilsson=axis.com@lists.openembedded.org> wrote: > > > > > > > > > > > > From: Adam Nilsson <adamni@axis.com> > > > > > > > > > > > > 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 > > > > 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). > > 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. 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.) > > 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
diff --git a/meta/classes-recipe/core-image.bbclass b/meta/classes-recipe/core-image.bbclass index 4072e420c5..309a7c577b 100644 --- a/meta/classes-recipe/core-image.bbclass +++ b/meta/classes-recipe/core-image.bbclass @@ -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 diff --git a/meta/classes-recipe/populate_sdk_base.bbclass b/meta/classes-recipe/populate_sdk_base.bbclass index 0c2fd26e6f..8e671cf28f 100644 --- a/meta/classes-recipe/populate_sdk_base.bbclass +++ b/meta/classes-recipe/populate_sdk_base.bbclass @@ -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')