Skip to contentSkip to conversation

base.bbclass: Introduce EXTRA_CONF_PACKAGECONFIG variable

RFC PATCH In review Martin Jansa 4 participants 14 messages Feb 27, 2016 – Apr 19, 2016

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 base.bbclass: Introduce EXTRA_CONF_PACKAGECONFIG variable

* add separate variable for configuration options generated from PACKAGECONFIG setting, this helps other bbclasses and recipes to take advantage of PACKAGECONFIG mechanism, without including other options from EXTRA_OECONF
* e.g. meta-qt5 recipes are abusing EXTRA_OECONF to get options from PACKAGECONFIG:
EXTRA_QMAKEVARS_PRE +=
but with
conf/distro/include/no-static-libs.inc
it means getting --disable-static as invalid option inside EXTRA_QMAKEVARS_PRE as reported by Alexandre Belloni who tried to use poky with meta-qt5.
* once we migrate all bbclasses and recipes to EXTRA_CONF_PACKAGECONFIG we should also restrict EXTRA_OECONF append only to autotools.bbclass like I did for cmake.bbclass

---
 meta/classes/base.bbclass  | 9 ++++++---
 meta/classes/cmake.bbclass | 2 ++
 2 files changed, 8 insertions(+), 3 deletions(-)
meta/classes/base.bbclass +6 -3
index 1372f38..6e94995 100644
@@ -428,9 +428,12 @@ python () {
                     extraconf.append(items[1])
         appendVar('DEPENDS', extradeps)
         appendVar('RDEPENDS_${PN}', extrardeps)
-        if bb.data.inherits_class('cmake', d):
-            appendVar('EXTRA_OECMAKE', extraconf)
-        else:
+        appendVar('EXTRA_CONF_PACKAGECONFIG', extraconf)
+
+        # TODO once are all recipes/bbclass abusign EXTRA_OECONF
+        # to get PACKAGECONFIG options fixed to use EXTRA_CONF_PACKAGECONFIG
+        # move this append to autotools.bbclass
+        if not bb.data.inherits_class('cmake', d):
             appendVar('EXTRA_OECONF', extraconf)
 
     pn = d.getVar('PN', True)
meta/classes/cmake.bbclass +2 -0
index 22cd61e..122718e 100644
@@ -27,6 +27,8 @@ OECMAKE_EXTRA_ROOT_PATH ?= ""
 OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "ONLY"
 OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM_class-native = "BOTH"
 
+EXTRA_OECMAKE_append = " ${EXTRA_CONF_PACKAGECONFIG}"
+
 # CMake expects target architectures in the format of uname(2),
 # which do not always match TARGET_ARCH, so all the necessary
 # conversions should happen here.
Signature · 1 line
2.7.1
#1 lore raw
Quoted 7 lines · Martin Jansa

* add separate variable for configuration options generated from PACKAGECONFIG setting, this helps other bbclasses and recipes to take advantage of PACKAGECONFIG mechanism, without including other options from EXTRA_OECONF
* e.g. meta-qt5 recipes are abusing EXTRA_OECONF to get options from PACKAGECONFIG:
EXTRA_QMAKEVARS_PRE +=

Quoted 8 lines

but with
conf/distro/include/no-static-libs.inc
it means getting --disable-static as invalid option inside EXTRA_QMAKEVARS_PRE as reported by Alexandre Belloni who tried to use poky with meta-qt5.
* once we migrate all bbclasses and recipes to EXTRA_CONF_PACKAGECONFIG we should also restrict EXTRA_OECONF append only to autotools.bbclass like I did for cmake.bbclass

No comments? Should I resend without [RFC] tag?

This is needed to fix couple components when
conf/distro/include/no-static-libs.inc is used.

Cheers,

#4 lore raw
In reply to Martin Jansa
Quoted 7 lines · Martin Jansa

* add separate variable for configuration options generated from PACKAGECONFIG setting, this helps other bbclasses and recipes to take advantage of PACKAGECONFIG mechanism, without including other options from EXTRA_OECONF
* e.g. meta-qt5 recipes are abusing EXTRA_OECONF to get options from PACKAGECONFIG:
EXTRA_QMAKEVARS_PRE +=

Quoted 9 lines

but with
conf/distro/include/no-static-libs.inc
it means getting --disable-static as invalid option inside EXTRA_QMAKEVARS_PRE as reported by Alexandre Belloni who tried to use poky with meta-qt5.
* once we migrate all bbclasses and recipes to EXTRA_CONF_PACKAGECONFIG we should also restrict EXTRA_OECONF append only to autotools.bbclass like I did for cmake.bbclass

Sorry, some of us have been a bit busy trying to get M3 stable. This does look good and I'm for squeezing it into M3.

Ross

#2 lore raw
In reply to Martin Jansa
Quoted 19 lines · Martin Jansa
Quoted 9 lines · Martin Jansa

* add separate variable for configuration options generated from PACKAGECONFIG setting, this helps other bbclasses and recipes to take advantage of PACKAGECONFIG mechanism, without including other options from EXTRA_OECONF
* e.g. meta-qt5 recipes are abusing EXTRA_OECONF to get options from PACKAGECONFIG:
EXTRA_QMAKEVARS_PRE +=
but with
conf/distro/include/no-static-libs.inc

Quoted 8 lines

it means getting --disable-static as invalid option inside EXTRA_QMAKEVARS_PRE as reported by Alexandre Belloni who tried to use poky with meta-qt5.
* once we migrate all bbclasses and recipes to EXTRA_CONF_PACKAGECONFIG
we should also restrict EXTRA_OECONF append only to
autotools.bbclass
like I did for cmake.bbclass

Quoted 4 lines

No comments? Should I resend without [RFC] tag?

This is needed to fix couple components when
conf/distro/include/no-static-libs.inc is used.

I can see the need for it, I'm just not 100% sure I like the form of the patch. No one particular thing is doing that, just a general feeling of unease which I can't quite put into words :(.

We continue to have a need to differentiate between "proper" autotools recipes and non-autotools recipes which would make this kind of issue easier. I guess I'm trying to weigh up whether we should consider something a bit more invasive to try and improve things and if we do that whether this patch helps or hinders that (it probably does help).

I'm also not 100% convinced EXTRA_CONF_PACKAGECONFIG is the right name, but I can see how you got here and I'm not sure I have a better suggestion (PACKAGECONFIG_CONFPARAMS? _CONFARGS?)

Cheers,

Richard

#3 lore raw
Quoted 29 lines · Richard Purdie
Quoted 19 lines · Martin Jansa
Quoted 9 lines · Martin Jansa

* add separate variable for configuration options generated from PACKAGECONFIG setting, this helps other bbclasses and recipes to take advantage of PACKAGECONFIG mechanism, without including other options from EXTRA_OECONF
* e.g. meta-qt5 recipes are abusing EXTRA_OECONF to get options from PACKAGECONFIG:
EXTRA_QMAKEVARS_PRE +=
but with
conf/distro/include/no-static-libs.inc

Quoted 8 lines

it means getting --disable-static as invalid option inside EXTRA_QMAKEVARS_PRE as reported by Alexandre Belloni who tried to use poky with meta-qt5.
* once we migrate all bbclasses and recipes to EXTRA_CONF_PACKAGECONFIG
we should also restrict EXTRA_OECONF append only to
autotools.bbclass
like I did for cmake.bbclass

Quoted 4 lines

No comments? Should I resend without [RFC] tag?

This is needed to fix couple components when
conf/distro/include/no-static-libs.inc is used.

I can see the need for it, I'm just not 100% sure I like the form of the patch. No one particular thing is doing that, just a general feeling of unease which I can't quite put into words :(.

Quoted 5 lines

We continue to have a need to differentiate between "proper" autotools recipes and non-autotools recipes which would make this kind of issue easier. I guess I'm trying to weigh up whether we should consider something a bit more invasive to try and improve things and if we do that whether this patch helps or hinders that (it probably does help).

I've considered the invasive part of moving EXTRA_OECONF append to autotools.bbclass (like I did for cmake.bbclass) but after grepping for EXTRA_OECONF I've decided to leave it for separate step (e.g. waf-samba.bbclass and meta-oe/recipes-benchmark/fio/fio_2.2.6.bb are abusing EXTRA_OECONF and would break if we remove this).

EXTRA_OECMAKE wasn't afaik abused anywhere and fix for qt5 was relatively simple:
http://patchwork.openembedded.org/patch/116981/

so I went with compromise to fix what's really failing now and leave future cleanup/improvement for later when more recipes adapt EXTRA_CONF_PACKAGECONFIG variable.

Quoted 3 lines

I'm also not 100% convinced EXTRA_CONF_PACKAGECONFIG is the right name, but I can see how you got here and I'm not sure I have a better suggestion (PACKAGECONFIG_CONFPARAMS? _CONFARGS?)

I was expecting this discussion, I have no strong opinion either way. Namespacing with with PACKAGECONFIG_ prefix is good idea though.

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#5 lore raw
In reply to Burton, Ross
Quoted 19 lines · Ross
Quoted 7 lines · Martin Jansa

* add separate variable for configuration options generated from PACKAGECONFIG setting, this helps other bbclasses and recipes to take advantage of PACKAGECONFIG mechanism, without including other options from EXTRA_OECONF
* e.g. meta-qt5 recipes are abusing EXTRA_OECONF to get options from PACKAGECONFIG:
EXTRA_QMAKEVARS_PRE +=

Quoted 9 lines

but with
conf/distro/include/no-static-libs.inc
it means getting --disable-static as invalid option inside EXTRA_QMAKEVARS_PRE as reported by Alexandre Belloni who tried to use poky with meta-qt5.
* once we migrate all bbclasses and recipes to EXTRA_CONF_PACKAGECONFIG we should also restrict EXTRA_OECONF append only to autotools.bbclass like I did for cmake.bbclass

Quoted 2 lines

Sorry, some of us have been a bit busy trying to get M3 stable. This does look good and I'm for squeezing it into M3.

Any update on squeezing this?

meta-qt5 is still broken with default poky config

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#6 lore raw
Quoted 23 lines · Martin Jansa
Quoted 22 lines · Ross
Quoted 18 lines · Martin Jansa

* add separate variable for configuration options generated from PACKAGECONFIG setting, this helps other bbclasses and recipes to take advantage of PACKAGECONFIG mechanism, without including other options from EXTRA_OECONF
* e.g. meta-qt5 recipes are abusing EXTRA_OECONF to get options from PACKAGECONFIG:
EXTRA_QMAKEVARS_PRE +=
but with
conf/distro/include/no-static-libs.inc
it means getting --disable-static as invalid option inside EXTRA_QMAKEVARS_PRE as reported by Alexandre Belloni who tried to use poky with meta-qt5.
* once we migrate all bbclasses and recipes to EXTRA_CONF_PACKAGECONFIG
we should also restrict EXTRA_OECONF append only to
autotools.bbclass
like I did for cmake.bbclass

Quoted 7 lines
Quoted 3 lines

Sorry, some of us have been a bit busy trying to get M3 stable.
This does
look good and I'm for squeezing it into M3.

Any update on squeezing this?

meta-qt5 is still broken with default poky config

I'm a little confused, was there going to be another version with some tweaked variable names?

Cheers,

Richard

#7 lore raw
Quoted 28 lines · Richard Purdie
Quoted 27 lines · Martin Jansa
Quoted 25 lines · Ross
Quoted 9 lines · Martin Jansa

* add separate variable for configuration options generated from PACKAGECONFIG setting, this helps other bbclasses and recipes to take advantage of PACKAGECONFIG mechanism, without including other options from EXTRA_OECONF
* e.g. meta-qt5 recipes are abusing EXTRA_OECONF to get options from PACKAGECONFIG:
EXTRA_QMAKEVARS_PRE +=
but with
conf/distro/include/no-static-libs.inc

Quoted 9 lines

it means getting --disable-static as invalid option inside EXTRA_QMAKEVARS_PRE as reported by Alexandre Belloni who tried to use poky with meta-qt5.
* once we migrate all bbclasses and recipes to EXTRA_CONF_PACKAGECONFIG
we should also restrict EXTRA_OECONF append only to
autotools.bbclass
like I did for cmake.bbclass

Sorry, some of us have been a bit busy trying to get M3 stable.
This does
look good and I'm for squeezing it into M3.

Quoted 6 lines
Quoted 3 lines

Any update on squeezing this?

meta-qt5 is still broken with default poky config

I'm a little confused, was there going to be another version with some tweaked variable names?

Was there some agreement about variable name?

:)

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#8 lore raw
Quoted 29 lines · Martin Jansa
Quoted 28 lines · Richard Purdie
Quoted 27 lines · Martin Jansa
Quoted 25 lines · Ross
Quoted 9 lines · Martin Jansa

* add separate variable for configuration options generated from PACKAGECONFIG setting, this helps other bbclasses and recipes to take advantage of PACKAGECONFIG mechanism, without including other options from EXTRA_OECONF
* e.g. meta-qt5 recipes are abusing EXTRA_OECONF to get options from PACKAGECONFIG:
EXTRA_QMAKEVARS_PRE +=
but with
conf/distro/include/no-static-libs.inc

Quoted 9 lines

it means getting --disable-static as invalid option inside EXTRA_QMAKEVARS_PRE as reported by Alexandre Belloni who tried to use poky with meta-qt5.
* once we migrate all bbclasses and recipes to EXTRA_CONF_PACKAGECONFIG
we should also restrict EXTRA_OECONF append only to
autotools.bbclass
like I did for cmake.bbclass

Sorry, some of us have been a bit busy trying to get M3 stable.
This does
look good and I'm for squeezing it into M3.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Any update on squeezing this?

meta-qt5 is still broken with default poky config

I'm a little confused, was there going to be another version with some tweaked variable names?

Was there some agreement about variable name?

meta-qt5 5.6 is using this so we need a final decision if it will be merged or not. I am in favor it as I think it is clear enough.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#9 lore raw
Quoted 43 lines · Otavio Salvador

On Fri, Mar 25, 2016 at 8:55 AM, Martin Jansa <[email protected]

Quoted 42 lines

wrote:

Quoted 40 lines · Richard Purdie
Quoted 38 lines · Martin Jansa
Quoted 29 lines · Ross
Quoted 15 lines · Martin Jansa

* add separate variable for configuration options generated from
PACKAGECONFIG setting, this helps other bbclasses and
recipes
to take advantage of PACKAGECONFIG mechanism, without
including
other options from EXTRA_OECONF
* e.g. meta-qt5 recipes are abusing EXTRA_OECONF to get options
from PACKAGECONFIG:
EXTRA_QMAKEVARS_PRE +=
but with
conf/distro/include/no-static-libs.inc
it means getting --disable-static as invalid option
inside

Quoted 9 lines

EXTRA_QMAKEVARS_PRE as reported by Alexandre Belloni who
tried
to use poky with meta-qt5.
* once we migrate all bbclasses and recipes to EXTRA_CONF_PACKAGECONFIG
we should also restrict EXTRA_OECONF append only to
autotools.bbclass
like I did for cmake.bbclass

Quoted 4 lines

Sorry, some of us have been a bit busy trying to get M3 stable.
This does
look good and I'm for squeezing it into M3.

Any update on squeezing this?

meta-qt5 is still broken with default poky config

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

I'm a little confused, was there going to be another version with some
tweaked variable names?

Was there some agreement about variable name?

meta-qt5 5.6 is using this so we need a final decision if it will be merged or not. I am in favor it as I think it is clear enough.

It was an RFC and I still don't get a good feeling about the names used.

I suggested:

PACKAGECONFIG_CONFPARAMS
or
PACKAGECONFIG_CONFARGS

as it then makes things slightly clearer these things are coming from PACKAGECONFIG. We have a namespace which is a bit of a mess and I'd prefer to try and improve with new things if we can...

The fact meta-qt5 is already using this is bad, it really shouldn't be. We're also very close to the final build of 2.1 right now so this would be a very late change :/.

Cheers,

Richard

#10 lore raw
Quoted 8 lines · Richard Purdie
Quoted 6 lines · Otavio Salvador

On Fri, Mar 25, 2016 at 8:55 AM, Martin Jansa <[email protected]

Quoted 2 lines

wrote:
Was there some agreement about variable name?

meta-qt5 5.6 is using this so we need a final decision if it will be merged or not. I am in favor it as I think it is clear enough.

Quoted 8 lines

It was an RFC and I still don't get a good feeling about the names used.

I suggested:

PACKAGECONFIG_CONFPARAMS
or
PACKAGECONFIG_CONFARGS

I like CONFARGS.

Quoted 7 lines

as it then makes things slightly clearer these things are coming from PACKAGECONFIG. We have a namespace which is a bit of a mess and I'd prefer to try and improve with new things if we can...

The fact meta-qt5 is already using this is bad, it really shouldn't be. We're also very close to the final build of 2.1 right now so this would be a very late change :/.

I think it is a safe change but I am fine in postponing it for 2.2. In this case we need to revert the usage of it in meta-qt5 (which I also support).

Martin?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#11 lore raw
Quoted 13 lines · Otavio Salvador
Quoted 11 lines · Richard Purdie
Quoted 6 lines · Otavio Salvador

On Fri, Mar 25, 2016 at 8:55 AM, Martin Jansa <[email protected]

Quoted 2 lines

wrote:
Was there some agreement about variable name?

meta-qt5 5.6 is using this so we need a final decision if it will be merged or not. I am in favor it as I think it is clear enough.

It was an RFC and I still don't get a good feeling about the names used.

Quoted 7 lines
Quoted 5 lines

I suggested:

PACKAGECONFIG_CONFPARAMS
or
PACKAGECONFIG_CONFARGS

I like CONFARGS.

I'll send patch with PACKAGECONFIG_CONFARGS and wait until it's merged somewhere, before updating usages of this in other layers (so that I don't need to redo it again if the name is changed again).

Quoted 7 lines
Quoted 7 lines

as it then makes things slightly clearer these things are coming from PACKAGECONFIG. We have a namespace which is a bit of a mess and I'd prefer to try and improve with new things if we can...

The fact meta-qt5 is already using this is bad, it really shouldn't be. We're also very close to the final build of 2.1 right now so this would be a very late change :/.

meta-qt5/master isn't using it, it's only in master-next, because without this change the builds are broken when people use openembedded-core/meta/conf/distro/include/no-static-libs.inc e.g. with default Poky config.

Quoted 3 lines

I think it is a safe change but I am fine in postponing it for 2.2. In this case we need to revert the usage of it in meta-qt5 (which I also support).

Nothing needs to be reverted, because it wasn't merged in any permanent layer.

If it doesn't go to 2.1 then I'll leave meta-qt5/krogoth version broken for Poky builds with no-static-libs.inc.

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#12 lore raw

PATCH 1/1 base.bbclass: Introduce PACKAGECONFIG_CONFARGS variable

* add separate variable for configuration options generated from PACKAGECONFIG setting, this helps other bbclasses and recipes to take advantage of PACKAGECONFIG mechanism, without including other options from EXTRA_OECONF
* e.g. meta-qt5 recipes are abusing EXTRA_OECONF to get options from PACKAGECONFIG:
EXTRA_QMAKEVARS_PRE +=
but with
conf/distro/include/no-static-libs.inc
it means getting --disable-static as invalid option inside EXTRA_QMAKEVARS_PRE as reported by Alexandre Belloni who tried to use poky with meta-qt5.
* once we migrate all bbclasses and recipes to PACKAGECONFIG_CONFARGS we should also restrict EXTRA_OECONF append only to autotools.bbclass like I did for cmake.bbclass

---
 meta/classes/base.bbclass  | 9 ++++++---
 meta/classes/cmake.bbclass | 2 ++
 2 files changed, 8 insertions(+), 3 deletions(-)
meta/classes/base.bbclass +6 -3
index f9697a9..0259259 100644
@@ -428,9 +428,12 @@ python () {
                     extraconf.append(items[1])
         appendVar('DEPENDS', extradeps)
         appendVar('RDEPENDS_${PN}', extrardeps)
-        if bb.data.inherits_class('cmake', d):
-            appendVar('EXTRA_OECMAKE', extraconf)
-        else:
+        appendVar('PACKAGECONFIG_CONFARGS', extraconf)
+
+        # TODO once are all recipes/bbclass abusign EXTRA_OECONF
+        # to get PACKAGECONFIG options fixed to use PACKAGECONFIG_CONFARGS
+        # move this append to autotools.bbclass
+        if not bb.data.inherits_class('cmake', d):
             appendVar('EXTRA_OECONF', extraconf)
 
     pn = d.getVar('PN', True)
meta/classes/cmake.bbclass +2 -0
index 22cd61e..02f313a 100644
@@ -27,6 +27,8 @@ OECMAKE_EXTRA_ROOT_PATH ?= ""
 OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "ONLY"
 OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM_class-native = "BOTH"
 
+EXTRA_OECMAKE_append = " ${PACKAGECONFIG_CONFARGS}"
+
 # CMake expects target architectures in the format of uname(2),
 # which do not always match TARGET_ARCH, so all the necessary
 # conversions should happen here.
Signature · 1 line
2.8.1
Acked-by on v1 1/1
#13 lore raw

Re: [PATCH] base.bbclass: Introduce PACKAGECONFIG_CONFARGS variable

Hello Martin,
Hello Richard,

Martin, thanks for updating the patch to comply to Richard's suggestions.

Quoted 16 lines · Martin Jansa

* add separate variable for configuration options generated from PACKAGECONFIG setting, this helps other bbclasses and recipes to take advantage of PACKAGECONFIG mechanism, without including other options from EXTRA_OECONF
* e.g. meta-qt5 recipes are abusing EXTRA_OECONF to get options from PACKAGECONFIG:
EXTRA_QMAKEVARS_PRE +=
but with
conf/distro/include/no-static-libs.inc
it means getting --disable-static as invalid option inside EXTRA_QMAKEVARS_PRE as reported by Alexandre Belloni who tried to use poky with meta-qt5.
* once we migrate all bbclasses and recipes to PACKAGECONFIG_CONFARGS we should also restrict EXTRA_OECONF append only to autotools.bbclass like I did for cmake.bbclass

Quoted 1 line

Richard, I understand we are late in the release cycle however this change is indeed required to fix our build of Qt5 using Poky distribution.

The patch seems fairly safe and should have no impact for current metadata, while it allow for meta-qt5 to fix the Poky support. The patch has been sent on Feb and ended being forgotten in the merge queue however it is being used daily by the World Build test from Martin, which includes it so static libraries can be disabled.

Please consider it for 2.1.

Best Regards,

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750