icu: fix make_icudata dependencies

Message ID 20220120143242.35930-1-kory.maincent@bootlin.com
State Accepted, archived
Commit c134f62062a6359d2d5831ba4cb9694035e4f25a
Headers show
Series icu: fix make_icudata dependencies | expand

Commit Message

Köry Maincent Jan. 20, 2022, 2:32 p.m. UTC
The make_icudata task is set before the configure task then the
dependencies for this task are not populate yet.

Fixed it by setting autoconf, automake and ccache native dependencies
to this task.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
 meta/recipes-support/icu/icu_70.1.bb | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Alexander Kanavin Jan. 20, 2022, 2:37 p.m. UTC | #1
Can we rather make a dependency on the task that prepares the sysroot,
instead of listing the dependencies one by one (with anonymous python too!)?

Alex

On Thu, 20 Jan 2022 at 15:32, Kory Maincent <kory.maincent@bootlin.com>
wrote:

> The make_icudata task is set before the configure task then the
> dependencies for this task are not populate yet.
>
> Fixed it by setting autoconf, automake and ccache native dependencies
> to this task.
>
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
>  meta/recipes-support/icu/icu_70.1.bb | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/meta/recipes-support/icu/icu_70.1.bb
> b/meta/recipes-support/icu/icu_70.1.bb
> index 0988ae8b8e..ae985bca4f 100644
> --- a/meta/recipes-support/icu/icu_70.1.bb
> +++ b/meta/recipes-support/icu/icu_70.1.bb
> @@ -123,6 +123,14 @@ EXTRA_OECONF:append:libc-musl = "
> ac_cv_func_strtod_l=no"
>  PACKAGECONFIG ?= ""
>  PACKAGECONFIG[make-icudata] = ",,,"
>
> +# Add dependencies to make_icudata
> +do_make_icudata[depends] = "autoconf-native:do_populate_sysroot
> automake-native:do_populate_sysroot"
> +python() {
> +    if not (bb.data.inherits_class("native", d) or
> +            bb.utils.to_boolean(d.getVar('CCACHE_DISABLE'))):
> +        d.appendVarFlag('do_make_icudata', 'depends', '
> ccache-native:do_populate_sysroot')
> +}
> +
>  do_make_icudata:class-target () {
>      ${@bb.utils.contains('PACKAGECONFIG', 'make-icudata', '', 'exit 0',
> d)}
>      cd ${S}
> --
> 2.25.1
>
>
Köry Maincent Jan. 20, 2022, 3:03 p.m. UTC | #2
Hello Alexander,

On Thu, 20 Jan 2022 15:37:26 +0100
Alexander Kanavin <alex.kanavin@gmail.com> wrote:

> Can we rather make a dependency on the task that prepares the sysroot,
> instead of listing the dependencies one by one (with anonymous python too!)?

Thanks for the review,
I do not understand your comments as the make_icudata is before the
configuration task.
Could you be more explicit or use an example?

Regards,

Köry

> 
> Alex
> 
> On Thu, 20 Jan 2022 at 15:32, Kory Maincent <kory.maincent@bootlin.com>
> wrote:
> 
> > The make_icudata task is set before the configure task then the
> > dependencies for this task are not populate yet.
> >
> > Fixed it by setting autoconf, automake and ccache native dependencies
> > to this task.
> >
> > Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> > ---
> >  meta/recipes-support/icu/icu_70.1.bb | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/meta/recipes-support/icu/icu_70.1.bb
> > b/meta/recipes-support/icu/icu_70.1.bb
> > index 0988ae8b8e..ae985bca4f 100644
> > --- a/meta/recipes-support/icu/icu_70.1.bb
> > +++ b/meta/recipes-support/icu/icu_70.1.bb
> > @@ -123,6 +123,14 @@ EXTRA_OECONF:append:libc-musl = "
> > ac_cv_func_strtod_l=no"
> >  PACKAGECONFIG ?= ""
> >  PACKAGECONFIG[make-icudata] = ",,,"
> >
> > +# Add dependencies to make_icudata
> > +do_make_icudata[depends] = "autoconf-native:do_populate_sysroot
> > automake-native:do_populate_sysroot"
> > +python() {
> > +    if not (bb.data.inherits_class("native", d) or
> > +            bb.utils.to_boolean(d.getVar('CCACHE_DISABLE'))):
> > +        d.appendVarFlag('do_make_icudata', 'depends', '
> > ccache-native:do_populate_sysroot')
> > +}
> > +
> >  do_make_icudata:class-target () {
> >      ${@bb.utils.contains('PACKAGECONFIG', 'make-icudata', '', 'exit 0',
> > d)}
> >      cd ${S}
> > --
> > 2.25.1
> >
> >
Alexander Kanavin Jan. 20, 2022, 3:09 p.m. UTC | #3
On Thu, 20 Jan 2022 at 16:03, Köry Maincent <kory.maincent@bootlin.com>
wrote:

> Hello Alexander,
>
> On Thu, 20 Jan 2022 15:37:26 +0100
> Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>
> > Can we rather make a dependency on the task that prepares the sysroot,
> > instead of listing the dependencies one by one (with anonymous python
> too!)?
>
> Thanks for the review,
> I do not understand your comments as the make_icudata is before the
> configuration task.
> Could you be more explicit or use an example?
>

I think you need something like

do_make_icudata[deptask] = "do_prepare_recipe_sysroot"

Alex
Köry Maincent Jan. 20, 2022, 4:17 p.m. UTC | #4
On Thu, 20 Jan 2022 16:09:25 +0100
Alexander Kanavin <alex.kanavin@gmail.com> wrote:

> > Could you be more explicit or use an example?
> >  
> 
> I think you need something like
> 
> do_make_icudata[deptask] = "do_prepare_recipe_sysroot"

Oh, I didn't know this deptask flag, thanks to point me this out.
I will send a v2 with this.

Köry

Patch

diff --git a/meta/recipes-support/icu/icu_70.1.bb b/meta/recipes-support/icu/icu_70.1.bb
index 0988ae8b8e..ae985bca4f 100644
--- a/meta/recipes-support/icu/icu_70.1.bb
+++ b/meta/recipes-support/icu/icu_70.1.bb
@@ -123,6 +123,14 @@  EXTRA_OECONF:append:libc-musl = " ac_cv_func_strtod_l=no"
 PACKAGECONFIG ?= ""
 PACKAGECONFIG[make-icudata] = ",,,"
 
+# Add dependencies to make_icudata
+do_make_icudata[depends] = "autoconf-native:do_populate_sysroot automake-native:do_populate_sysroot"
+python() {
+    if not (bb.data.inherits_class("native", d) or
+            bb.utils.to_boolean(d.getVar('CCACHE_DISABLE'))):
+        d.appendVarFlag('do_make_icudata', 'depends', ' ccache-native:do_populate_sysroot')
+}
+
 do_make_icudata:class-target () {
     ${@bb.utils.contains('PACKAGECONFIG', 'make-icudata', '', 'exit 0', d)}
     cd ${S}