public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] libxml2: don't override XML_CATALOG_FILES in xmllint wrapper if already set
@ 2022-09-09 16:36 Ross Burton
  2022-09-09 16:53 ` [OE-core] " Jacob Kroon
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ross Burton @ 2022-09-09 16:36 UTC (permalink / raw)
  To: openembedded-core; +Cc: schnitzeltony

The KDE build uses custom catalogs by setting XML_CATALOG_FILES, so this
wrapper should not override that value if it has already been set.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-core/libxml/libxml2_2.9.14.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/libxml/libxml2_2.9.14.bb b/meta/recipes-core/libxml/libxml2_2.9.14.bb
index 2b2289e38a6..165c92d4114 100644
--- a/meta/recipes-core/libxml/libxml2_2.9.14.bb
+++ b/meta/recipes-core/libxml/libxml2_2.9.14.bb
@@ -121,7 +121,7 @@ do_install:append:class-native () {
 	# Docs are not needed in the native case
 	rm ${D}${datadir}/gtk-doc -rf
 
-	create_wrapper ${D}${bindir}/xmllint XML_CATALOG_FILES=${sysconfdir}/xml/catalog
+	create_wrapper ${D}${bindir}/xmllint 'XML_CATALOG_FILES=${XML_CATALOG_FILES:-${sysconfdir}/xml/catalog}'
 }
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH] libxml2: don't override XML_CATALOG_FILES in xmllint wrapper if already set
  2022-09-09 16:36 [PATCH] libxml2: don't override XML_CATALOG_FILES in xmllint wrapper if already set Ross Burton
@ 2022-09-09 16:53 ` Jacob Kroon
  2022-09-09 17:00   ` Ross Burton
  2022-09-09 22:54 ` Richard Purdie
       [not found] ` <17135317F9CABC3C.4025@lists.openembedded.org>
  2 siblings, 1 reply; 9+ messages in thread
From: Jacob Kroon @ 2022-09-09 16:53 UTC (permalink / raw)
  To: Ross Burton, openembedded-core; +Cc: schnitzeltony

On 9/9/22 18:36, Ross Burton wrote:
> The KDE build uses custom catalogs by setting XML_CATALOG_FILES, so this
> wrapper should not override that value if it has already been set.
> 
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>   meta/recipes-core/libxml/libxml2_2.9.14.bb | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/libxml/libxml2_2.9.14.bb b/meta/recipes-core/libxml/libxml2_2.9.14.bb
> index 2b2289e38a6..165c92d4114 100644
> --- a/meta/recipes-core/libxml/libxml2_2.9.14.bb
> +++ b/meta/recipes-core/libxml/libxml2_2.9.14.bb
> @@ -121,7 +121,7 @@ do_install:append:class-native () {
>   	# Docs are not needed in the native case
>   	rm ${D}${datadir}/gtk-doc -rf
>   
> -	create_wrapper ${D}${bindir}/xmllint XML_CATALOG_FILES=${sysconfdir}/xml/catalog
> +	create_wrapper ${D}${bindir}/xmllint 'XML_CATALOG_FILES=${XML_CATALOG_FILES:-${sysconfdir}/xml/catalog}'

That ...:-${sysconfdir}/... looks odd. Is that hyphen intentional ?

>   }
>   
>   BBCLASSEXTEND = "native nativesdk"
> 
> 
> 

Jacob


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH] libxml2: don't override XML_CATALOG_FILES in xmllint wrapper if already set
  2022-09-09 16:53 ` [OE-core] " Jacob Kroon
@ 2022-09-09 17:00   ` Ross Burton
  2022-09-09 17:05     ` Jacob Kroon
  0 siblings, 1 reply; 9+ messages in thread
From: Ross Burton @ 2022-09-09 17:00 UTC (permalink / raw)
  To: Jacob Kroon
  Cc: openembedded-core@lists.openembedded.org, schnitzeltony@gmail.com

>>  -	create_wrapper ${D}${bindir}/xmllint XML_CATALOG_FILES=${sysconfdir}/xml/catalog
>> +	create_wrapper ${D}${bindir}/xmllint 'XML_CATALOG_FILES=${XML_CATALOG_FILES:-${sysconfdir}/xml/catalog}'
> 
> That ...:-${sysconfdir}/... looks odd. Is that hyphen intentional ?

Yes:

     ${parameter:-word}    Use Default Values.  If parameter is unset or null, the expansion of word is substituted; otherwise, the value of
                           parameter is substituted.

Ross

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH] libxml2: don't override XML_CATALOG_FILES in xmllint wrapper if already set
  2022-09-09 17:00   ` Ross Burton
@ 2022-09-09 17:05     ` Jacob Kroon
  0 siblings, 0 replies; 9+ messages in thread
From: Jacob Kroon @ 2022-09-09 17:05 UTC (permalink / raw)
  To: Ross Burton
  Cc: openembedded-core@lists.openembedded.org, schnitzeltony@gmail.com

On 9/9/22 19:00, Ross Burton wrote:
>>>   -	create_wrapper ${D}${bindir}/xmllint XML_CATALOG_FILES=${sysconfdir}/xml/catalog
>>> +	create_wrapper ${D}${bindir}/xmllint 'XML_CATALOG_FILES=${XML_CATALOG_FILES:-${sysconfdir}/xml/catalog}'
>>
>> That ...:-${sysconfdir}/... looks odd. Is that hyphen intentional ?
> 
> Yes:
> 
>       ${parameter:-word}    Use Default Values.  If parameter is unset or null, the expansion of word is substituted; otherwise, the value of
>                             parameter is substituted.
> 
> Ross
> 

Aha, very nice, sorry for the noise.

Jacob


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH] libxml2: don't override XML_CATALOG_FILES in xmllint wrapper if already set
  2022-09-09 16:36 [PATCH] libxml2: don't override XML_CATALOG_FILES in xmllint wrapper if already set Ross Burton
  2022-09-09 16:53 ` [OE-core] " Jacob Kroon
@ 2022-09-09 22:54 ` Richard Purdie
       [not found] ` <17135317F9CABC3C.4025@lists.openembedded.org>
  2 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2022-09-09 22:54 UTC (permalink / raw)
  To: Ross Burton, openembedded-core; +Cc: schnitzeltony

On Fri, 2022-09-09 at 17:36 +0100, Ross Burton wrote:
> The KDE build uses custom catalogs by setting XML_CATALOG_FILES, so this
> wrapper should not override that value if it has already been set.
> 
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>  meta/recipes-core/libxml/libxml2_2.9.14.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/libxml/libxml2_2.9.14.bb b/meta/recipes-core/libxml/libxml2_2.9.14.bb
> index 2b2289e38a6..165c92d4114 100644
> --- a/meta/recipes-core/libxml/libxml2_2.9.14.bb
> +++ b/meta/recipes-core/libxml/libxml2_2.9.14.bb
> @@ -121,7 +121,7 @@ do_install:append:class-native () {
>  	# Docs are not needed in the native case
>  	rm ${D}${datadir}/gtk-doc -rf
>  
> -	create_wrapper ${D}${bindir}/xmllint XML_CATALOG_FILES=${sysconfdir}/xml/catalog
> +	create_wrapper ${D}${bindir}/xmllint 'XML_CATALOG_FILES=${XML_CATALOG_FILES:-${sysconfdir}/xml/catalog}'
>  }

https://autobuilder.yoctoproject.org/typhoon/#/builders/69/builds/5823/steps/24/logs/stdio

:/

Cheers,

Richard



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH] libxml2: don't override XML_CATALOG_FILES in xmllint wrapper if already set
       [not found] ` <17135317F9CABC3C.4025@lists.openembedded.org>
@ 2022-09-11 22:21   ` Richard Purdie
       [not found]   ` <1713EE7A59F012D9.1776@lists.openembedded.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2022-09-11 22:21 UTC (permalink / raw)
  To: Ross Burton, openembedded-core; +Cc: schnitzeltony

On Fri, 2022-09-09 at 23:54 +0100, Richard Purdie via
lists.openembedded.org wrote:
> On Fri, 2022-09-09 at 17:36 +0100, Ross Burton wrote:
> > The KDE build uses custom catalogs by setting XML_CATALOG_FILES, so this
> > wrapper should not override that value if it has already been set.
> > 
> > Signed-off-by: Ross Burton <ross.burton@arm.com>
> > ---
> >  meta/recipes-core/libxml/libxml2_2.9.14.bb | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta/recipes-core/libxml/libxml2_2.9.14.bb b/meta/recipes-core/libxml/libxml2_2.9.14.bb
> > index 2b2289e38a6..165c92d4114 100644
> > --- a/meta/recipes-core/libxml/libxml2_2.9.14.bb
> > +++ b/meta/recipes-core/libxml/libxml2_2.9.14.bb
> > @@ -121,7 +121,7 @@ do_install:append:class-native () {
> >  	# Docs are not needed in the native case
> >  	rm ${D}${datadir}/gtk-doc -rf
> >  
> > -	create_wrapper ${D}${bindir}/xmllint XML_CATALOG_FILES=${sysconfdir}/xml/catalog
> > +	create_wrapper ${D}${bindir}/xmllint 'XML_CATALOG_FILES=${XML_CATALOG_FILES:-${sysconfdir}/xml/catalog}'
> >  }
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/69/builds/5823/steps/24/logs/stdio


Dependency on variable XML_CATALOG_FILES:-/media/build1/poky/build-st-282284/tmp-sstatesamehash/work/x86_64-linux/libxml2-native/2.9.14-r0/recipe-sysroot-native/etc/xml/catalog was added
Dependency on Variable XML_CATALOG_FILES:-/media/build1/poky/build-st-282284/tmp-sstatesamehash2/work/x86_64-linux/libxml2-native/2.9.14-r0/recipe-sysroot-native/etc/xml/catalog was removed

i.e. it is expanding the variable in the keyname!

Cheers,

Richard



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH] libxml2: don't override XML_CATALOG_FILES in xmllint wrapper if already set
       [not found]   ` <1713EE7A59F012D9.1776@lists.openembedded.org>
@ 2022-09-12  9:43     ` Richard Purdie
  2022-09-12 21:59       ` Andreas Müller
  2022-09-13 17:14       ` Peter Kjellerstedt
  0 siblings, 2 replies; 9+ messages in thread
From: Richard Purdie @ 2022-09-12  9:43 UTC (permalink / raw)
  To: Ross Burton, openembedded-core; +Cc: schnitzeltony

On Sun, 2022-09-11 at 23:21 +0100, Richard Purdie via
lists.openembedded.org wrote:
> On Fri, 2022-09-09 at 23:54 +0100, Richard Purdie via
> lists.openembedded.org wrote:
> > On Fri, 2022-09-09 at 17:36 +0100, Ross Burton wrote:
> > > The KDE build uses custom catalogs by setting XML_CATALOG_FILES, so this
> > > wrapper should not override that value if it has already been set.
> > > 
> > > Signed-off-by: Ross Burton <ross.burton@arm.com>
> > > ---
> > >  meta/recipes-core/libxml/libxml2_2.9.14.bb | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/meta/recipes-core/libxml/libxml2_2.9.14.bb b/meta/recipes-core/libxml/libxml2_2.9.14.bb
> > > index 2b2289e38a6..165c92d4114 100644
> > > --- a/meta/recipes-core/libxml/libxml2_2.9.14.bb
> > > +++ b/meta/recipes-core/libxml/libxml2_2.9.14.bb
> > > @@ -121,7 +121,7 @@ do_install:append:class-native () {
> > >  	# Docs are not needed in the native case
> > >  	rm ${D}${datadir}/gtk-doc -rf
> > >  
> > > -	create_wrapper ${D}${bindir}/xmllint XML_CATALOG_FILES=${sysconfdir}/xml/catalog
> > > +	create_wrapper ${D}${bindir}/xmllint 'XML_CATALOG_FILES=${XML_CATALOG_FILES:-${sysconfdir}/xml/catalog}'
> > >  }
> > 
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/69/builds/5823/steps/24/logs/stdio
> 
> 
> Dependency on variable XML_CATALOG_FILES:-/media/build1/poky/build-st-282284/tmp-sstatesamehash/work/x86_64-linux/libxml2-native/2.9.14-r0/recipe-sysroot-native/etc/xml/catalog was added
> Dependency on Variable XML_CATALOG_FILES:-/media/build1/poky/build-st-282284/tmp-sstatesamehash2/work/x86_64-linux/libxml2-native/2.9.14-r0/recipe-sysroot-native/etc/xml/catalog was removed
> 
> i.e. it is expanding the variable in the keyname!

I tweaked the patch to exclude this variable for now. We probably need
to think a bit more about what bitbake is considering a variable name
though...

Cheers,

Richard


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH] libxml2: don't override XML_CATALOG_FILES in xmllint wrapper if already set
  2022-09-12  9:43     ` Richard Purdie
@ 2022-09-12 21:59       ` Andreas Müller
  2022-09-13 17:14       ` Peter Kjellerstedt
  1 sibling, 0 replies; 9+ messages in thread
From: Andreas Müller @ 2022-09-12 21:59 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Ross Burton, openembedded-core

On Mon, Sep 12, 2022 at 11:43 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Sun, 2022-09-11 at 23:21 +0100, Richard Purdie via
> lists.openembedded.org wrote:
> > On Fri, 2022-09-09 at 23:54 +0100, Richard Purdie via
> > lists.openembedded.org wrote:
> > > On Fri, 2022-09-09 at 17:36 +0100, Ross Burton wrote:
> > > > The KDE build uses custom catalogs by setting XML_CATALOG_FILES, so this
> > > > wrapper should not override that value if it has already been set.
> > > >
> > > > Signed-off-by: Ross Burton <ross.burton@arm.com>
> > > > ---
> > > >  meta/recipes-core/libxml/libxml2_2.9.14.bb | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/meta/recipes-core/libxml/libxml2_2.9.14.bb b/meta/recipes-core/libxml/libxml2_2.9.14.bb
> > > > index 2b2289e38a6..165c92d4114 100644
> > > > --- a/meta/recipes-core/libxml/libxml2_2.9.14.bb
> > > > +++ b/meta/recipes-core/libxml/libxml2_2.9.14.bb
> > > > @@ -121,7 +121,7 @@ do_install:append:class-native () {
> > > >   # Docs are not needed in the native case
> > > >   rm ${D}${datadir}/gtk-doc -rf
> > > >
> > > > - create_wrapper ${D}${bindir}/xmllint XML_CATALOG_FILES=${sysconfdir}/xml/catalog
> > > > + create_wrapper ${D}${bindir}/xmllint 'XML_CATALOG_FILES=${XML_CATALOG_FILES:-${sysconfdir}/xml/catalog}'
> > > >  }
> > >
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/69/builds/5823/steps/24/logs/stdio
> >
> >
> > Dependency on variable XML_CATALOG_FILES:-/media/build1/poky/build-st-282284/tmp-sstatesamehash/work/x86_64-linux/libxml2-native/2.9.14-r0/recipe-sysroot-native/etc/xml/catalog was added
> > Dependency on Variable XML_CATALOG_FILES:-/media/build1/poky/build-st-282284/tmp-sstatesamehash2/work/x86_64-linux/libxml2-native/2.9.14-r0/recipe-sysroot-native/etc/xml/catalog was removed
> >
> > i.e. it is expanding the variable in the keyname!
>
> I tweaked the patch to exclude this variable for now. We probably need
> to think a bit more about what bitbake is considering a variable name
> though...

Thanks for addressing. Will remove my workaround in meta-qt5-extra and
hope not to come back :)

Andreas


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [OE-core] [PATCH] libxml2: don't override XML_CATALOG_FILES in xmllint wrapper if already set
  2022-09-12  9:43     ` Richard Purdie
  2022-09-12 21:59       ` Andreas Müller
@ 2022-09-13 17:14       ` Peter Kjellerstedt
  1 sibling, 0 replies; 9+ messages in thread
From: Peter Kjellerstedt @ 2022-09-13 17:14 UTC (permalink / raw)
  To: Richard Purdie, Ross Burton,
	openembedded-core@lists.openembedded.org
  Cc: schnitzeltony@gmail.com

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Richard Purdie
> Sent: den 12 september 2022 10:44
> To: Ross Burton <ross.burton@arm.com>; openembedded-core@lists.openembedded.org
> Cc: schnitzeltony@gmail.com
> Subject: Re: [OE-core] [PATCH] libxml2: don't override XML_CATALOG_FILES in xmllint wrapper if already set
> 
> On Sun, 2022-09-11 at 23:21 +0100, Richard Purdie via
> lists.openembedded.org wrote:
> > On Fri, 2022-09-09 at 23:54 +0100, Richard Purdie via
> > lists.openembedded.org wrote:
> > > On Fri, 2022-09-09 at 17:36 +0100, Ross Burton wrote:
> > > > The KDE build uses custom catalogs by setting XML_CATALOG_FILES, so this
> > > > wrapper should not override that value if it has already been set.
> > > >
> > > > Signed-off-by: Ross Burton <ross.burton@arm.com>
> > > > ---
> > > >  meta/recipes-core/libxml/libxml2_2.9.14.bb | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/meta/recipes-core/libxml/libxml2_2.9.14.bb b/meta/recipes-core/libxml/libxml2_2.9.14.bb
> > > > index 2b2289e38a6..165c92d4114 100644
> > > > --- a/meta/recipes-core/libxml/libxml2_2.9.14.bb
> > > > +++ b/meta/recipes-core/libxml/libxml2_2.9.14.bb
> > > > @@ -121,7 +121,7 @@ do_install:append:class-native () {
> > > >  	# Docs are not needed in the native case
> > > >  	rm ${D}${datadir}/gtk-doc -rf
> > > >
> > > > -	create_wrapper ${D}${bindir}/xmllint XML_CATALOG_FILES=${sysconfdir}/xml/catalog
> > > > +	create_wrapper ${D}${bindir}/xmllint 'XML_CATALOG_FILES=${XML_CATALOG_FILES:-${sysconfdir}/xml/catalog}'
> > > >  }
> > >
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/69/builds/5823/steps/24/logs/stdio
> >
> > Dependency on variable XML_CATALOG_FILES:-/media/build1/poky/build-st-282284/tmp-sstatesamehash/work/x86_64-linux/libxml2-native/2.9.14-r0/recipe-sysroot-native/etc/xml/catalog was added
> > Dependency on Variable XML_CATALOG_FILES:-/media/build1/poky/build-st-282284/tmp-sstatesamehash2/work/x86_64-linux/libxml2-native/2.9.14-r0/recipe-sysroot-native/etc/xml/catalog was removed
> >
> > i.e. it is expanding the variable in the keyname!
> 
> I tweaked the patch to exclude this variable for now. We probably need
> to think a bit more about what bitbake is considering a variable name
> though...
> 
> Cheers,
> 
> Richard

Hasn't this always been the case for shell variables where you need to 
use ${...} for one reason or another? I know I have changed a number of 
"${some_shell_variable}" to "$some_shell_variable" over the years to 
mitigate it a little, but that is obviously not possible for non-trivial 
cases of shell parameter expansions.

//Peter


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-09-13 17:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-09 16:36 [PATCH] libxml2: don't override XML_CATALOG_FILES in xmllint wrapper if already set Ross Burton
2022-09-09 16:53 ` [OE-core] " Jacob Kroon
2022-09-09 17:00   ` Ross Burton
2022-09-09 17:05     ` Jacob Kroon
2022-09-09 22:54 ` Richard Purdie
     [not found] ` <17135317F9CABC3C.4025@lists.openembedded.org>
2022-09-11 22:21   ` Richard Purdie
     [not found]   ` <1713EE7A59F012D9.1776@lists.openembedded.org>
2022-09-12  9:43     ` Richard Purdie
2022-09-12 21:59       ` Andreas Müller
2022-09-13 17:14       ` Peter Kjellerstedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox