All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] xmlcatalog.bbclass: execute xmlcatalog only if it's available
@ 2019-07-05  1:30 Chen Qi
  2019-07-05  1:30 ` [PATCH 1/1] " Chen Qi
  0 siblings, 1 reply; 5+ messages in thread
From: Chen Qi @ 2019-07-05  1:30 UTC (permalink / raw)
  To: openembedded-core

*** BLURB HERE ***
The following changes since commit 4fd9ee4670293632cc0ca1e64b8833eb6014435d:

  bitbake: bitbake: Add --skip-setscene option (2019-07-03 17:00:57 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/xmlcatalog-esdk
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/xmlcatalog-esdk

Chen Qi (1):
  xmlcatalog.bbclass: execute xmlcatalog only if it's available

 meta/classes/xmlcatalog.bbclass | 2 ++
 1 file changed, 2 insertions(+)

-- 
1.9.1



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

* [PATCH 1/1] xmlcatalog.bbclass: execute xmlcatalog only if it's available
  2019-07-05  1:30 [PATCH 0/1] xmlcatalog.bbclass: execute xmlcatalog only if it's available Chen Qi
@ 2019-07-05  1:30 ` Chen Qi
  2019-07-05 10:35   ` Richard Purdie
  2019-07-05 16:38   ` Burton, Ross
  0 siblings, 2 replies; 5+ messages in thread
From: Chen Qi @ 2019-07-05  1:30 UTC (permalink / raw)
  To: openembedded-core

For build-sysroots.bb, the xmlcatalog would not be in its
staging directory. Causing the following error for eSDK.

ERROR: build-sysroots-1.0-r0 do_build_native_sysroot: Command '/PATH/TO/IMAGE/testsdkext/tmp/sysroots/x86_64/usr/bin/postinst-docbook-xml-dtd4-native-xmlcatalog' returned non-zero exit status 127.
ERROR: build-sysroots-1.0-r0 do_build_native_sysroot: Function failed: do_build_native_sysroot

The problem could be reproduced by the following steps.
1. Add in local.conf:
   IMAGE_INSTALL_append = " btrfs-tools"
   DISTRO_FEATURES_append = " api-documentation"
   INHERIT += "testsdk"
2. bitbake core-image-minimal -c populate_sdk_ext
3. bitbake core-image-minimal -c testsdkext

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/classes/xmlcatalog.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/xmlcatalog.bbclass b/meta/classes/xmlcatalog.bbclass
index 075aef8..e805e7b 100644
--- a/meta/classes/xmlcatalog.bbclass
+++ b/meta/classes/xmlcatalog.bbclass
@@ -5,6 +5,8 @@ XMLCATALOGS ?= ""
 SYSROOT_PREPROCESS_FUNCS_append = " xmlcatalog_sstate_postinst"
 
 xmlcatalog_complete() {
+	# In case of eSDK, build-sysroot does not have xmlcatalog in its staging directory.
+	[ "`which xmlcatalog`" = "" ] && exit 0
 	ROOTCATALOG="${STAGING_ETCDIR_NATIVE}/xml/catalog"
 	if [ ! -f $ROOTCATALOG ]; then
 		mkdir --parents $(dirname $ROOTCATALOG)
-- 
1.9.1



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

* Re: [PATCH 1/1] xmlcatalog.bbclass: execute xmlcatalog only if it's available
  2019-07-05  1:30 ` [PATCH 1/1] " Chen Qi
@ 2019-07-05 10:35   ` Richard Purdie
  2019-07-05 16:38   ` Burton, Ross
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2019-07-05 10:35 UTC (permalink / raw)
  To: Chen Qi, openembedded-core

On Fri, 2019-07-05 at 09:30 +0800, Chen Qi wrote:
> For build-sysroots.bb, the xmlcatalog would not be in its
> staging directory. Causing the following error for eSDK.
> 
> ERROR: build-sysroots-1.0-r0 do_build_native_sysroot: Command '/PATH/TO/IMAGE/testsdkext/tmp/sysroots/x86_64/usr/bin/postinst-docbook-xml-dtd4-native-xmlcatalog' returned non-zero exit status 127.
> ERROR: build-sysroots-1.0-r0 do_build_native_sysroot: Function failed: do_build_native_sysroot
> 
> The problem could be reproduced by the following steps.
> 1. Add in local.conf:
>    IMAGE_INSTALL_append = " btrfs-tools"
>    DISTRO_FEATURES_append = " api-documentation"
>    INHERIT += "testsdk"
> 2. bitbake core-image-minimal -c populate_sdk_ext
> 3. bitbake core-image-minimal -c testsdkext
> 
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  meta/classes/xmlcatalog.bbclass | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/classes/xmlcatalog.bbclass b/meta/classes/xmlcatalog.bbclass
> index 075aef8..e805e7b 100644
> --- a/meta/classes/xmlcatalog.bbclass
> +++ b/meta/classes/xmlcatalog.bbclass
> @@ -5,6 +5,8 @@ XMLCATALOGS ?= ""
>  SYSROOT_PREPROCESS_FUNCS_append = " xmlcatalog_sstate_postinst"
>  
>  xmlcatalog_complete() {
> +	# In case of eSDK, build-sysroot does not have xmlcatalog in its staging directory.
> +	[ "`which xmlcatalog`" = "" ] && exit 0
>  	ROOTCATALOG="${STAGING_ETCDIR_NATIVE}/xml/catalog"
>  	if [ ! -f $ROOTCATALOG ]; then
>  		mkdir --parents $(dirname $ROOTCATALOG)

This seems rather risky since it leaves the sysroot in an unexpected
state and means that elsewhere in the code we now have to account for
postinst scripts which may or may not have run.

Whilst this fixes a bug I worry it may open up a whole new class of
even worse problems :(

Cheers,

Richard





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

* Re: [PATCH 1/1] xmlcatalog.bbclass: execute xmlcatalog only if it's available
  2019-07-05  1:30 ` [PATCH 1/1] " Chen Qi
  2019-07-05 10:35   ` Richard Purdie
@ 2019-07-05 16:38   ` Burton, Ross
  2019-07-08  7:14     ` ChenQi
  1 sibling, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2019-07-05 16:38 UTC (permalink / raw)
  To: Chen Qi; +Cc: OE-core

We could just always install libxml2 into the SDK...

On Fri, 5 Jul 2019 at 02:18, Chen Qi <Qi.Chen@windriver.com> wrote:
>
> For build-sysroots.bb, the xmlcatalog would not be in its
> staging directory. Causing the following error for eSDK.
>
> ERROR: build-sysroots-1.0-r0 do_build_native_sysroot: Command '/PATH/TO/IMAGE/testsdkext/tmp/sysroots/x86_64/usr/bin/postinst-docbook-xml-dtd4-native-xmlcatalog' returned non-zero exit status 127.
> ERROR: build-sysroots-1.0-r0 do_build_native_sysroot: Function failed: do_build_native_sysroot
>
> The problem could be reproduced by the following steps.
> 1. Add in local.conf:
>    IMAGE_INSTALL_append = " btrfs-tools"
>    DISTRO_FEATURES_append = " api-documentation"
>    INHERIT += "testsdk"
> 2. bitbake core-image-minimal -c populate_sdk_ext
> 3. bitbake core-image-minimal -c testsdkext
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  meta/classes/xmlcatalog.bbclass | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/meta/classes/xmlcatalog.bbclass b/meta/classes/xmlcatalog.bbclass
> index 075aef8..e805e7b 100644
> --- a/meta/classes/xmlcatalog.bbclass
> +++ b/meta/classes/xmlcatalog.bbclass
> @@ -5,6 +5,8 @@ XMLCATALOGS ?= ""
>  SYSROOT_PREPROCESS_FUNCS_append = " xmlcatalog_sstate_postinst"
>
>  xmlcatalog_complete() {
> +       # In case of eSDK, build-sysroot does not have xmlcatalog in its staging directory.
> +       [ "`which xmlcatalog`" = "" ] && exit 0
>         ROOTCATALOG="${STAGING_ETCDIR_NATIVE}/xml/catalog"
>         if [ ! -f $ROOTCATALOG ]; then
>                 mkdir --parents $(dirname $ROOTCATALOG)
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [PATCH 1/1] xmlcatalog.bbclass: execute xmlcatalog only if it's available
  2019-07-05 16:38   ` Burton, Ross
@ 2019-07-08  7:14     ` ChenQi
  0 siblings, 0 replies; 5+ messages in thread
From: ChenQi @ 2019-07-08  7:14 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On 07/06/2019 12:38 AM, Burton, Ross wrote:
> We could just always install libxml2 into the SDK...

Good idea. I'll send out a new patch.

> On Fri, 5 Jul 2019 at 02:18, Chen Qi <Qi.Chen@windriver.com> wrote:
>> For build-sysroots.bb, the xmlcatalog would not be in its
>> staging directory. Causing the following error for eSDK.
>>
>> ERROR: build-sysroots-1.0-r0 do_build_native_sysroot: Command '/PATH/TO/IMAGE/testsdkext/tmp/sysroots/x86_64/usr/bin/postinst-docbook-xml-dtd4-native-xmlcatalog' returned non-zero exit status 127.
>> ERROR: build-sysroots-1.0-r0 do_build_native_sysroot: Function failed: do_build_native_sysroot
>>
>> The problem could be reproduced by the following steps.
>> 1. Add in local.conf:
>>     IMAGE_INSTALL_append = " btrfs-tools"
>>     DISTRO_FEATURES_append = " api-documentation"
>>     INHERIT += "testsdk"
>> 2. bitbake core-image-minimal -c populate_sdk_ext
>> 3. bitbake core-image-minimal -c testsdkext
>>
>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> ---
>>   meta/classes/xmlcatalog.bbclass | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/meta/classes/xmlcatalog.bbclass b/meta/classes/xmlcatalog.bbclass
>> index 075aef8..e805e7b 100644
>> --- a/meta/classes/xmlcatalog.bbclass
>> +++ b/meta/classes/xmlcatalog.bbclass
>> @@ -5,6 +5,8 @@ XMLCATALOGS ?= ""
>>   SYSROOT_PREPROCESS_FUNCS_append = " xmlcatalog_sstate_postinst"
>>
>>   xmlcatalog_complete() {
>> +       # In case of eSDK, build-sysroot does not have xmlcatalog in its staging directory.
>> +       [ "`which xmlcatalog`" = "" ] && exit 0
>>          ROOTCATALOG="${STAGING_ETCDIR_NATIVE}/xml/catalog"
>>          if [ ! -f $ROOTCATALOG ]; then
>>                  mkdir --parents $(dirname $ROOTCATALOG)
>> --
>> 1.9.1
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core




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

end of thread, other threads:[~2019-07-08  7:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-05  1:30 [PATCH 0/1] xmlcatalog.bbclass: execute xmlcatalog only if it's available Chen Qi
2019-07-05  1:30 ` [PATCH 1/1] " Chen Qi
2019-07-05 10:35   ` Richard Purdie
2019-07-05 16:38   ` Burton, Ross
2019-07-08  7:14     ` ChenQi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.