Message ID | 20220812112643.2168104-1-jose.quaresma@foundries.io |
---|---|
State | New |
Headers | show |
Series | linux-yocto: adds a space when append to KERNEL_EXTRA_ARGS | expand |
On Fri, Aug 12, 2022 at 7:27 AM Jose Quaresma <quaresma.jose@gmail.com> wrote: > > Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> > --- > meta/recipes-kernel/linux/linux-yocto.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc > index cabc8f4975..7ea661e138 100644 > --- a/meta/recipes-kernel/linux/linux-yocto.inc > +++ b/meta/recipes-kernel/linux/linux-yocto.inc > @@ -60,7 +60,7 @@ do_install:append(){ > KERNEL_FEATURES:append:qemuall=" features/kernel-sample/kernel-sample.scc" > > KERNEL_DEBUG_OPTIONS ?= "stack" > -KERNEL_EXTRA_ARGS:append:x86-64 = "${@bb.utils.contains('KERNEL_DEBUG_OPTIONS', 'stack', 'HOST_LIBELF_LIBS="-L${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig/../../../usr/lib/ -lelf"', '', d)}" > +KERNEL_EXTRA_ARGS:append:x86-64 = " ${@bb.utils.contains('KERNEL_DEBUG_OPTIONS', 'stack', 'HOST_LIBELF_LIBS="-L${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig/../../../usr/lib/ -lelf"', '', d)}" The space would be intentional, as :append doesn't add one (or maybe I'm not seeing the removed space with the small font I'm currently reading this with). Was it causing a problem ? Bruce > > do_devshell:prepend() { > # setup native pkg-config variables (kconfig scripts call pkg-config directly, cannot generically be overriden to pkg-config-native) > -- > 2.34.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#169281): https://lists.openembedded.org/g/openembedded-core/message/169281 > Mute This Topic: https://lists.openembedded.org/mt/92977591/1050810 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [bruce.ashfield@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Bruce Ashfield <bruce.ashfield@gmail.com> escreveu no dia sexta, 12/08/2022 à(s) 14:08: > On Fri, Aug 12, 2022 at 7:27 AM Jose Quaresma <quaresma.jose@gmail.com> > wrote: > > > > Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> > > --- > > meta/recipes-kernel/linux/linux-yocto.inc | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/meta/recipes-kernel/linux/linux-yocto.inc > b/meta/recipes-kernel/linux/linux-yocto.inc > > index cabc8f4975..7ea661e138 100644 > > --- a/meta/recipes-kernel/linux/linux-yocto.inc > > +++ b/meta/recipes-kernel/linux/linux-yocto.inc > > @@ -60,7 +60,7 @@ do_install:append(){ > > KERNEL_FEATURES:append:qemuall=" > features/kernel-sample/kernel-sample.scc" > > > > KERNEL_DEBUG_OPTIONS ?= "stack" > > -KERNEL_EXTRA_ARGS:append:x86-64 = > "${@bb.utils.contains('KERNEL_DEBUG_OPTIONS', 'stack', > 'HOST_LIBELF_LIBS="-L${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig/../../../usr/lib/ > -lelf"', '', d)}" > > +KERNEL_EXTRA_ARGS:append:x86-64 = " > ${@bb.utils.contains('KERNEL_DEBUG_OPTIONS', 'stack', > 'HOST_LIBELF_LIBS="-L${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig/../../../usr/lib/ > -lelf"', '', d)}" > > The space would be intentional, as :append doesn't add one (or maybe I'm not seeing the removed space with the small font I'm currently > reading this with). > but there is no space and what my patch does is adding it before the char '$' change form 'x86-64 = "$' to 'x86-64 = " $' that afaik is the policy used when we need to append something to variable with :append (take into account the extra space) maybe my commit title can be changed to: linux-yocto: prepend the the value with a space when append to KERNEL_EXTRA_ARGS > > Was it causing a problem ? > yes, if you use KERNEL_EXTRA_ARGS=X or KERNEL_EXTRA_ARGS:append=X in your code it doesn't work because of the missing space and at the end KERNEL_EXTRA_ARGS will have: KERNEL_EXTRA_ARGS = "XHOST_LIBELF_.... instead of KERNEL_EXTRA_ARGS = "X HOST_LIBELF_.... Jose > Bruce > > > > > do_devshell:prepend() { > > # setup native pkg-config variables (kconfig scripts call > pkg-config directly, cannot generically be overriden to pkg-config-native) > > -- > > 2.34.1 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#169281): > https://lists.openembedded.org/g/openembedded-core/message/169281 > > Mute This Topic: https://lists.openembedded.org/mt/92977591/1050810 > > Group Owner: openembedded-core+owner@lists.openembedded.org > > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > bruce.ashfield@gmail.com] > > -=-=-=-=-=-=-=-=-=-=-=- > > > > > -- > - Thou shalt not follow the NULL pointer, for chaos and madness await > thee at its end > - "Use the force Harry" - Gandalf, Star Trek II >
On Fri, Aug 12, 2022 at 9:57 AM Jose Quaresma <quaresma.jose@gmail.com> wrote: > > > > Bruce Ashfield <bruce.ashfield@gmail.com> escreveu no dia sexta, 12/08/2022 à(s) 14:08: >> >> On Fri, Aug 12, 2022 at 7:27 AM Jose Quaresma <quaresma.jose@gmail.com> wrote: >> > >> > Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> >> > --- >> > meta/recipes-kernel/linux/linux-yocto.inc | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >> > >> > diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc >> > index cabc8f4975..7ea661e138 100644 >> > --- a/meta/recipes-kernel/linux/linux-yocto.inc >> > +++ b/meta/recipes-kernel/linux/linux-yocto.inc >> > @@ -60,7 +60,7 @@ do_install:append(){ >> > KERNEL_FEATURES:append:qemuall=" features/kernel-sample/kernel-sample.scc" >> > >> > KERNEL_DEBUG_OPTIONS ?= "stack" >> > -KERNEL_EXTRA_ARGS:append:x86-64 = "${@bb.utils.contains('KERNEL_DEBUG_OPTIONS', 'stack', 'HOST_LIBELF_LIBS="-L${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig/../../../usr/lib/ -lelf"', '', d)}" >> > +KERNEL_EXTRA_ARGS:append:x86-64 = " ${@bb.utils.contains('KERNEL_DEBUG_OPTIONS', 'stack', 'HOST_LIBELF_LIBS="-L${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig/../../../usr/lib/ -lelf"', '', d)}" >> >> The space would be intentional, as :append doesn't add one (or maybe >> >> I'm not seeing the removed space with the small font I'm currently >> reading this with). > > > but there is no space and what my patch does is adding it before the char '$' change form 'x86-64 = "$' to 'x86-64 = " $' > that afaik is the policy used when we need to append something to variable with :append (take into account the extra space) > > maybe my commit title can be changed to: > linux-yocto: prepend the the value with a space when append to KERNEL_EXTRA_ARGS Ah yes, the grammar of the short log made me misread the patch. When someone says "adds a space ..", I read it as "it was adding a space before, and I'm changing it to not do that". "add a space" would be enough, but yes, the new shortlog is better and is fine with me. > >> >> >> Was it causing a problem ? > > > yes, if you use KERNEL_EXTRA_ARGS=X or KERNEL_EXTRA_ARGS:append=X in your code it doesn't work > because of the missing space and at the end KERNEL_EXTRA_ARGS will have: > > KERNEL_EXTRA_ARGS = "XHOST_LIBELF_.... > > instead of > > KERNEL_EXTRA_ARGS = "X HOST_LIBELF_.... yes, once I'm reading the shortlog and patch correctly, the potential issues are clear! Bruce > > Jose > >> >> Bruce >> >> > >> > do_devshell:prepend() { >> > # setup native pkg-config variables (kconfig scripts call pkg-config directly, cannot generically be overriden to pkg-config-native) >> > -- >> > 2.34.1 >> > >> > >> > -=-=-=-=-=-=-=-=-=-=-=- >> > Links: You receive all messages sent to this group. >> > View/Reply Online (#169281): https://lists.openembedded.org/g/openembedded-core/message/169281 >> > Mute This Topic: https://lists.openembedded.org/mt/92977591/1050810 >> > Group Owner: openembedded-core+owner@lists.openembedded.org >> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [bruce.ashfield@gmail.com] >> > -=-=-=-=-=-=-=-=-=-=-=- >> > >> >> >> -- >> - Thou shalt not follow the NULL pointer, for chaos and madness await >> thee at its end >> - "Use the force Harry" - Gandalf, Star Trek II > > > > -- > Best regards, > > José Quaresma
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc index cabc8f4975..7ea661e138 100644 --- a/meta/recipes-kernel/linux/linux-yocto.inc +++ b/meta/recipes-kernel/linux/linux-yocto.inc @@ -60,7 +60,7 @@ do_install:append(){ KERNEL_FEATURES:append:qemuall=" features/kernel-sample/kernel-sample.scc" KERNEL_DEBUG_OPTIONS ?= "stack" -KERNEL_EXTRA_ARGS:append:x86-64 = "${@bb.utils.contains('KERNEL_DEBUG_OPTIONS', 'stack', 'HOST_LIBELF_LIBS="-L${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig/../../../usr/lib/ -lelf"', '', d)}" +KERNEL_EXTRA_ARGS:append:x86-64 = " ${@bb.utils.contains('KERNEL_DEBUG_OPTIONS', 'stack', 'HOST_LIBELF_LIBS="-L${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig/../../../usr/lib/ -lelf"', '', d)}" do_devshell:prepend() { # setup native pkg-config variables (kconfig scripts call pkg-config directly, cannot generically be overriden to pkg-config-native)
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> --- meta/recipes-kernel/linux/linux-yocto.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)