All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] python3targetconfig.bbclass: Add py3 dependecy only for target recipes
@ 2020-11-17 15:34 Khem Raj
  2020-11-17 16:41 ` Martin Jansa
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2020-11-17 15:34 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj, Alexander Kanavin, Martin Jansa

python3targetconfig append target python3 to dependencies
unconditionally, and here its inherited unconditionally too but
distutils3-base is inherited in BBCLASSEXTEND'ed recipes and other not-target
recipes as well. Hence the change added via 9c8f666097802cb594a759989edcf01603a22df3
is now bridging the native dependencies with target python3 and thats
resulting all sorts of rebuilds for multimachine builds e.g.

MACHINE=qemuarm bitbake python3-scons-native
MACHINE=qemumips bitbake python3-scons-native

results in rebuilds for python3-scons-native

bitbake-diffsigs shows

Hash for dependent task python/python3-scons-native_3.1.2.bb:do_populate_sysroot changed from 1cdb93193b416477df6faa137e83a967b433c7aa29033146b405153f73f36933 to 3cea1e7cbedd121ecb768fbc291cc4e4d7d3b5c0442897
0e3b97bd058d162065
    Hash for dependent task python/python3-scons-native_3.1.2.bb:do_install changed from 8d6018fd03ffc6060a04532dc39a5b7ccca1be026a69d069cb4fb11aef86dd89 to c5f1d173596a8e910f45a2b6e0b4dab96cd0102be4d62bd3156
229cb0f5ebb11
        Hash for dependent task python/python3-scons-native_3.1.2.bb:do_compile changed from e3ee4b52a15267e6ae7853ec19a666b2fb62608a597608793336382d1c45f8a0 to 1e582043dfe6b3e00aaa532f363ce6afb37652abe837dac
7cc9769194c43eae1
            Hash for dependent task python/python3-scons-native_3.1.2.bb:do_configure changed from 770a4d5a77a96ebd9e1e7368f710bca3f88e3b1266dffa3b2d0360b1e3a81e27 to a366982778b03eee5165c3117ee778f848acdfaa2
b346650fbdf114ac70ab57b
                Hash for dependent task python/python3-scons-native_3.1.2.bb:do_prepare_recipe_sysroot changed from 958910037856ff5d5eb2b5162b3cdd02a3a710fc543b933cfeba771ee095cb72 to 474333fb565f908992fd3716
4935aaecf31a79e867826fe634cde4f44171d8e7
                    Hash for dependent task python/python3_3.9.0.bb:do_populate_sysroot changed from 7ac1c4fcbb2eacf98d2c32d991751bd2f3c7d55e2e32f2c9e485e7f5975fecf8 to 25dcfe74a95af19cce8df7c29311cc5edbbf6ad
08777e46a6fa6e417c0445018

...

Therefore limit inheriting this class only for target recipes.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: Martin Jansa <Martin.Jansa@gmail.com>
---
v2: Mark depends conditional instead

 meta/classes/python3targetconfig.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/python3targetconfig.bbclass b/meta/classes/python3targetconfig.bbclass
index 640d0c97b6..b79ec211c7 100644
--- a/meta/classes/python3targetconfig.bbclass
+++ b/meta/classes/python3targetconfig.bbclass
@@ -1,6 +1,6 @@
 inherit python3native
 
-DEPENDS_append = " python3"
+DEPENDS_append = "${@['', ' python3']['${CLASSOVERRIDE}' == 'class-target']}"
 
 do_configure_prepend() {
         export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
-- 
2.29.2


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

* Re: [PATCH] python3targetconfig.bbclass: Add py3 dependecy only for target recipes
  2020-11-17 15:34 [PATCH] python3targetconfig.bbclass: Add py3 dependecy only for target recipes Khem Raj
@ 2020-11-17 16:41 ` Martin Jansa
  2020-11-17 16:42   ` Martin Jansa
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2020-11-17 16:41 UTC (permalink / raw)
  To: Khem Raj
  Cc: Patches and discussions about the oe-core layer, Alexander Kanavin

[-- Attachment #1: Type: text/plain, Size: 3578 bytes --]

Do we need to export _PYTHON_SYSCONFIGDATA_NAME for non-target cases?

And instead of:
DEPENDS_append = "${@['', ' python3']['${CLASSOVERRIDE}' ==
'class-target']}"

I would use intermediate variable like
EXTRA_PYTHON_DEPENDS = "python3"
EXTRA_PYTHON_DEPENDS_class-target = ""
DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"

I know it's just personal preference, but in this case with small benefit
to undo the append if you really don't want it added for some mysterious
reason.

On Tue, Nov 17, 2020 at 4:34 PM Khem Raj <raj.khem@gmail.com> wrote:

> python3targetconfig append target python3 to dependencies
> unconditionally, and here its inherited unconditionally too but
> distutils3-base is inherited in BBCLASSEXTEND'ed recipes and other
> not-target
> recipes as well. Hence the change added via
> 9c8f666097802cb594a759989edcf01603a22df3
> is now bridging the native dependencies with target python3 and thats
> resulting all sorts of rebuilds for multimachine builds e.g.
>
> MACHINE=qemuarm bitbake python3-scons-native
> MACHINE=qemumips bitbake python3-scons-native
>
> results in rebuilds for python3-scons-native
>
> bitbake-diffsigs shows
>
> Hash for dependent task python/python3-scons-native_3.1.2.bb:do_populate_sysroot
> changed from
> 1cdb93193b416477df6faa137e83a967b433c7aa29033146b405153f73f36933 to
> 3cea1e7cbedd121ecb768fbc291cc4e4d7d3b5c0442897
> 0e3b97bd058d162065
>     Hash for dependent task python/python3-scons-native_3.1.2.bb:do_install
> changed from
> 8d6018fd03ffc6060a04532dc39a5b7ccca1be026a69d069cb4fb11aef86dd89 to
> c5f1d173596a8e910f45a2b6e0b4dab96cd0102be4d62bd3156
> 229cb0f5ebb11
>         Hash for dependent task python/python3-scons-native_3.1.2.bb:do_compile
> changed from
> e3ee4b52a15267e6ae7853ec19a666b2fb62608a597608793336382d1c45f8a0 to
> 1e582043dfe6b3e00aaa532f363ce6afb37652abe837dac
> 7cc9769194c43eae1
>             Hash for dependent task python/python3-scons-native_3.1.2.bb:do_configure
> changed from
> 770a4d5a77a96ebd9e1e7368f710bca3f88e3b1266dffa3b2d0360b1e3a81e27 to
> a366982778b03eee5165c3117ee778f848acdfaa2
> b346650fbdf114ac70ab57b
>                 Hash for dependent task
> python/python3-scons-native_3.1.2.bb:do_prepare_recipe_sysroot changed
> from 958910037856ff5d5eb2b5162b3cdd02a3a710fc543b933cfeba771ee095cb72 to
> 474333fb565f908992fd3716
> 4935aaecf31a79e867826fe634cde4f44171d8e7
>                     Hash for dependent task python/python3_3.9.0.bb:do_populate_sysroot
> changed from
> 7ac1c4fcbb2eacf98d2c32d991751bd2f3c7d55e2e32f2c9e485e7f5975fecf8 to
> 25dcfe74a95af19cce8df7c29311cc5edbbf6ad
> 08777e46a6fa6e417c0445018
>
> ...
>
> Therefore limit inheriting this class only for target recipes.
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Alexander Kanavin <alex.kanavin@gmail.com>
> Cc: Martin Jansa <Martin.Jansa@gmail.com>
> ---
> v2: Mark depends conditional instead
>
>  meta/classes/python3targetconfig.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/python3targetconfig.bbclass
> b/meta/classes/python3targetconfig.bbclass
> index 640d0c97b6..b79ec211c7 100644
> --- a/meta/classes/python3targetconfig.bbclass
> +++ b/meta/classes/python3targetconfig.bbclass
> @@ -1,6 +1,6 @@
>  inherit python3native
>
> -DEPENDS_append = " python3"
> +DEPENDS_append = "${@['', ' python3']['${CLASSOVERRIDE}' ==
> 'class-target']}"
>
>  do_configure_prepend() {
>          export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
> --
> 2.29.2
>
>

[-- Attachment #2: Type: text/html, Size: 4392 bytes --]

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

* Re: [PATCH] python3targetconfig.bbclass: Add py3 dependecy only for target recipes
  2020-11-17 16:41 ` Martin Jansa
@ 2020-11-17 16:42   ` Martin Jansa
  2020-11-17 17:45     ` Alexander Kanavin
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2020-11-17 16:42 UTC (permalink / raw)
  To: Khem Raj
  Cc: Patches and discussions about the oe-core layer, Alexander Kanavin

[-- Attachment #1: Type: text/plain, Size: 3905 bytes --]

Errm, I meant:

EXTRA_PYTHON_DEPENDS ?= ""
EXTRA_PYTHON_DEPENDS_class-target = "python3"
DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"

On Tue, Nov 17, 2020 at 5:41 PM Martin Jansa <martin.jansa@gmail.com> wrote:

> Do we need to export _PYTHON_SYSCONFIGDATA_NAME for non-target cases?
>
> And instead of:
> DEPENDS_append = "${@['', ' python3']['${CLASSOVERRIDE}' ==
> 'class-target']}"
>
> I would use intermediate variable like
> EXTRA_PYTHON_DEPENDS = "python3"
> EXTRA_PYTHON_DEPENDS_class-target = ""
> DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"
>
> I know it's just personal preference, but in this case with small benefit
> to undo the append if you really don't want it added for some mysterious
> reason.
>
> On Tue, Nov 17, 2020 at 4:34 PM Khem Raj <raj.khem@gmail.com> wrote:
>
>> python3targetconfig append target python3 to dependencies
>> unconditionally, and here its inherited unconditionally too but
>> distutils3-base is inherited in BBCLASSEXTEND'ed recipes and other
>> not-target
>> recipes as well. Hence the change added via
>> 9c8f666097802cb594a759989edcf01603a22df3
>> is now bridging the native dependencies with target python3 and thats
>> resulting all sorts of rebuilds for multimachine builds e.g.
>>
>> MACHINE=qemuarm bitbake python3-scons-native
>> MACHINE=qemumips bitbake python3-scons-native
>>
>> results in rebuilds for python3-scons-native
>>
>> bitbake-diffsigs shows
>>
>> Hash for dependent task python/python3-scons-native_3.1.2.bb:do_populate_sysroot
>> changed from
>> 1cdb93193b416477df6faa137e83a967b433c7aa29033146b405153f73f36933 to
>> 3cea1e7cbedd121ecb768fbc291cc4e4d7d3b5c0442897
>> 0e3b97bd058d162065
>>     Hash for dependent task python/python3-scons-native_3.1.2.bb:do_install
>> changed from
>> 8d6018fd03ffc6060a04532dc39a5b7ccca1be026a69d069cb4fb11aef86dd89 to
>> c5f1d173596a8e910f45a2b6e0b4dab96cd0102be4d62bd3156
>> 229cb0f5ebb11
>>         Hash for dependent task python/python3-scons-native_3.1.2.bb:do_compile
>> changed from
>> e3ee4b52a15267e6ae7853ec19a666b2fb62608a597608793336382d1c45f8a0 to
>> 1e582043dfe6b3e00aaa532f363ce6afb37652abe837dac
>> 7cc9769194c43eae1
>>             Hash for dependent task python/python3-scons-native_3.1.2.bb:do_configure
>> changed from
>> 770a4d5a77a96ebd9e1e7368f710bca3f88e3b1266dffa3b2d0360b1e3a81e27 to
>> a366982778b03eee5165c3117ee778f848acdfaa2
>> b346650fbdf114ac70ab57b
>>                 Hash for dependent task
>> python/python3-scons-native_3.1.2.bb:do_prepare_recipe_sysroot changed
>> from 958910037856ff5d5eb2b5162b3cdd02a3a710fc543b933cfeba771ee095cb72 to
>> 474333fb565f908992fd3716
>> 4935aaecf31a79e867826fe634cde4f44171d8e7
>>                     Hash for dependent task python/python3_3.9.0.bb:do_populate_sysroot
>> changed from
>> 7ac1c4fcbb2eacf98d2c32d991751bd2f3c7d55e2e32f2c9e485e7f5975fecf8 to
>> 25dcfe74a95af19cce8df7c29311cc5edbbf6ad
>> 08777e46a6fa6e417c0445018
>>
>> ...
>>
>> Therefore limit inheriting this class only for target recipes.
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> Cc: Alexander Kanavin <alex.kanavin@gmail.com>
>> Cc: Martin Jansa <Martin.Jansa@gmail.com>
>> ---
>> v2: Mark depends conditional instead
>>
>>  meta/classes/python3targetconfig.bbclass | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/python3targetconfig.bbclass
>> b/meta/classes/python3targetconfig.bbclass
>> index 640d0c97b6..b79ec211c7 100644
>> --- a/meta/classes/python3targetconfig.bbclass
>> +++ b/meta/classes/python3targetconfig.bbclass
>> @@ -1,6 +1,6 @@
>>  inherit python3native
>>
>> -DEPENDS_append = " python3"
>> +DEPENDS_append = "${@['', ' python3']['${CLASSOVERRIDE}' ==
>> 'class-target']}"
>>
>>  do_configure_prepend() {
>>          export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
>> --
>> 2.29.2
>>
>>

[-- Attachment #2: Type: text/html, Size: 4991 bytes --]

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

* Re: [PATCH] python3targetconfig.bbclass: Add py3 dependecy only for target recipes
  2020-11-17 16:42   ` Martin Jansa
@ 2020-11-17 17:45     ` Alexander Kanavin
  2020-11-17 20:29       ` Martin Jansa
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Kanavin @ 2020-11-17 17:45 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Khem Raj, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 4262 bytes --]

The commit description should be adjusted to drop mention of BBCLASSEXTEND,
the problem does not happen there.

Also note my comment in the other thread.

Alex

On Tue, 17 Nov 2020 at 17:42, Martin Jansa <martin.jansa@gmail.com> wrote:

> Errm, I meant:
>
> EXTRA_PYTHON_DEPENDS ?= ""
> EXTRA_PYTHON_DEPENDS_class-target = "python3"
> DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"
>
> On Tue, Nov 17, 2020 at 5:41 PM Martin Jansa <martin.jansa@gmail.com>
> wrote:
>
>> Do we need to export _PYTHON_SYSCONFIGDATA_NAME for non-target cases?
>>
>> And instead of:
>> DEPENDS_append = "${@['', ' python3']['${CLASSOVERRIDE}' ==
>> 'class-target']}"
>>
>> I would use intermediate variable like
>> EXTRA_PYTHON_DEPENDS = "python3"
>> EXTRA_PYTHON_DEPENDS_class-target = ""
>> DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"
>>
>> I know it's just personal preference, but in this case with small benefit
>> to undo the append if you really don't want it added for some mysterious
>> reason.
>>
>> On Tue, Nov 17, 2020 at 4:34 PM Khem Raj <raj.khem@gmail.com> wrote:
>>
>>> python3targetconfig append target python3 to dependencies
>>> unconditionally, and here its inherited unconditionally too but
>>> distutils3-base is inherited in BBCLASSEXTEND'ed recipes and other
>>> not-target
>>> recipes as well. Hence the change added via
>>> 9c8f666097802cb594a759989edcf01603a22df3
>>> is now bridging the native dependencies with target python3 and thats
>>> resulting all sorts of rebuilds for multimachine builds e.g.
>>>
>>> MACHINE=qemuarm bitbake python3-scons-native
>>> MACHINE=qemumips bitbake python3-scons-native
>>>
>>> results in rebuilds for python3-scons-native
>>>
>>> bitbake-diffsigs shows
>>>
>>> Hash for dependent task python/python3-scons-native_3.1.2.bb:do_populate_sysroot
>>> changed from
>>> 1cdb93193b416477df6faa137e83a967b433c7aa29033146b405153f73f36933 to
>>> 3cea1e7cbedd121ecb768fbc291cc4e4d7d3b5c0442897
>>> 0e3b97bd058d162065
>>>     Hash for dependent task python/python3-scons-native_3.1.2.bb:do_install
>>> changed from
>>> 8d6018fd03ffc6060a04532dc39a5b7ccca1be026a69d069cb4fb11aef86dd89 to
>>> c5f1d173596a8e910f45a2b6e0b4dab96cd0102be4d62bd3156
>>> 229cb0f5ebb11
>>>         Hash for dependent task python/python3-scons-native_3.1.2.bb:do_compile
>>> changed from
>>> e3ee4b52a15267e6ae7853ec19a666b2fb62608a597608793336382d1c45f8a0 to
>>> 1e582043dfe6b3e00aaa532f363ce6afb37652abe837dac
>>> 7cc9769194c43eae1
>>>             Hash for dependent task python/python3-scons-native_3.1.2.bb:do_configure
>>> changed from
>>> 770a4d5a77a96ebd9e1e7368f710bca3f88e3b1266dffa3b2d0360b1e3a81e27 to
>>> a366982778b03eee5165c3117ee778f848acdfaa2
>>> b346650fbdf114ac70ab57b
>>>                 Hash for dependent task
>>> python/python3-scons-native_3.1.2.bb:do_prepare_recipe_sysroot changed
>>> from 958910037856ff5d5eb2b5162b3cdd02a3a710fc543b933cfeba771ee095cb72 to
>>> 474333fb565f908992fd3716
>>> 4935aaecf31a79e867826fe634cde4f44171d8e7
>>>                     Hash for dependent task python/python3_3.9.0.bb:do_populate_sysroot
>>> changed from
>>> 7ac1c4fcbb2eacf98d2c32d991751bd2f3c7d55e2e32f2c9e485e7f5975fecf8 to
>>> 25dcfe74a95af19cce8df7c29311cc5edbbf6ad
>>> 08777e46a6fa6e417c0445018
>>>
>>> ...
>>>
>>> Therefore limit inheriting this class only for target recipes.
>>>
>>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>>> Cc: Alexander Kanavin <alex.kanavin@gmail.com>
>>> Cc: Martin Jansa <Martin.Jansa@gmail.com>
>>> ---
>>> v2: Mark depends conditional instead
>>>
>>>  meta/classes/python3targetconfig.bbclass | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/meta/classes/python3targetconfig.bbclass
>>> b/meta/classes/python3targetconfig.bbclass
>>> index 640d0c97b6..b79ec211c7 100644
>>> --- a/meta/classes/python3targetconfig.bbclass
>>> +++ b/meta/classes/python3targetconfig.bbclass
>>> @@ -1,6 +1,6 @@
>>>  inherit python3native
>>>
>>> -DEPENDS_append = " python3"
>>> +DEPENDS_append = "${@['', ' python3']['${CLASSOVERRIDE}' ==
>>> 'class-target']}"
>>>
>>>  do_configure_prepend() {
>>>          export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
>>> --
>>> 2.29.2
>>>
>>>

[-- Attachment #2: Type: text/html, Size: 5625 bytes --]

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

* Re: [PATCH] python3targetconfig.bbclass: Add py3 dependecy only for target recipes
  2020-11-17 17:45     ` Alexander Kanavin
@ 2020-11-17 20:29       ` Martin Jansa
  2020-11-17 20:34         ` Alexander Kanavin
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2020-11-17 20:29 UTC (permalink / raw)
  To: Alexander Kanavin
  Cc: Khem Raj, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 4662 bytes --]

BBCLASSEXTEND was also a bit broken, right? You said that
_PYTHON_SYSCONFIGDATA_NAME shouldn't be exported without a dependency on
target python3 which the BBCLASSEXTENDed native didn't get.

On Tue, Nov 17, 2020 at 6:45 PM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> The commit description should be adjusted to drop mention of
> BBCLASSEXTEND, the problem does not happen there.
>
> Also note my comment in the other thread.
>
> Alex
>
> On Tue, 17 Nov 2020 at 17:42, Martin Jansa <martin.jansa@gmail.com> wrote:
>
>> Errm, I meant:
>>
>> EXTRA_PYTHON_DEPENDS ?= ""
>> EXTRA_PYTHON_DEPENDS_class-target = "python3"
>> DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"
>>
>> On Tue, Nov 17, 2020 at 5:41 PM Martin Jansa <martin.jansa@gmail.com>
>> wrote:
>>
>>> Do we need to export _PYTHON_SYSCONFIGDATA_NAME for non-target cases?
>>>
>>> And instead of:
>>> DEPENDS_append = "${@['', ' python3']['${CLASSOVERRIDE}' ==
>>> 'class-target']}"
>>>
>>> I would use intermediate variable like
>>> EXTRA_PYTHON_DEPENDS = "python3"
>>> EXTRA_PYTHON_DEPENDS_class-target = ""
>>> DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"
>>>
>>> I know it's just personal preference, but in this case with small
>>> benefit to undo the append if you really don't want it added for some
>>> mysterious reason.
>>>
>>> On Tue, Nov 17, 2020 at 4:34 PM Khem Raj <raj.khem@gmail.com> wrote:
>>>
>>>> python3targetconfig append target python3 to dependencies
>>>> unconditionally, and here its inherited unconditionally too but
>>>> distutils3-base is inherited in BBCLASSEXTEND'ed recipes and other
>>>> not-target
>>>> recipes as well. Hence the change added via
>>>> 9c8f666097802cb594a759989edcf01603a22df3
>>>> is now bridging the native dependencies with target python3 and thats
>>>> resulting all sorts of rebuilds for multimachine builds e.g.
>>>>
>>>> MACHINE=qemuarm bitbake python3-scons-native
>>>> MACHINE=qemumips bitbake python3-scons-native
>>>>
>>>> results in rebuilds for python3-scons-native
>>>>
>>>> bitbake-diffsigs shows
>>>>
>>>> Hash for dependent task python/python3-scons-native_3.1.2.bb:do_populate_sysroot
>>>> changed from
>>>> 1cdb93193b416477df6faa137e83a967b433c7aa29033146b405153f73f36933 to
>>>> 3cea1e7cbedd121ecb768fbc291cc4e4d7d3b5c0442897
>>>> 0e3b97bd058d162065
>>>>     Hash for dependent task python/python3-scons-native_3.1.2.bb:do_install
>>>> changed from
>>>> 8d6018fd03ffc6060a04532dc39a5b7ccca1be026a69d069cb4fb11aef86dd89 to
>>>> c5f1d173596a8e910f45a2b6e0b4dab96cd0102be4d62bd3156
>>>> 229cb0f5ebb11
>>>>         Hash for dependent task python/python3-scons-native_3.1.2.bb:do_compile
>>>> changed from
>>>> e3ee4b52a15267e6ae7853ec19a666b2fb62608a597608793336382d1c45f8a0 to
>>>> 1e582043dfe6b3e00aaa532f363ce6afb37652abe837dac
>>>> 7cc9769194c43eae1
>>>>             Hash for dependent task
>>>> python/python3-scons-native_3.1.2.bb:do_configure changed from
>>>> 770a4d5a77a96ebd9e1e7368f710bca3f88e3b1266dffa3b2d0360b1e3a81e27 to
>>>> a366982778b03eee5165c3117ee778f848acdfaa2
>>>> b346650fbdf114ac70ab57b
>>>>                 Hash for dependent task
>>>> python/python3-scons-native_3.1.2.bb:do_prepare_recipe_sysroot changed
>>>> from 958910037856ff5d5eb2b5162b3cdd02a3a710fc543b933cfeba771ee095cb72 to
>>>> 474333fb565f908992fd3716
>>>> 4935aaecf31a79e867826fe634cde4f44171d8e7
>>>>                     Hash for dependent task python/python3_3.9.0.bb:do_populate_sysroot
>>>> changed from
>>>> 7ac1c4fcbb2eacf98d2c32d991751bd2f3c7d55e2e32f2c9e485e7f5975fecf8 to
>>>> 25dcfe74a95af19cce8df7c29311cc5edbbf6ad
>>>> 08777e46a6fa6e417c0445018
>>>>
>>>> ...
>>>>
>>>> Therefore limit inheriting this class only for target recipes.
>>>>
>>>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>>>> Cc: Alexander Kanavin <alex.kanavin@gmail.com>
>>>> Cc: Martin Jansa <Martin.Jansa@gmail.com>
>>>> ---
>>>> v2: Mark depends conditional instead
>>>>
>>>>  meta/classes/python3targetconfig.bbclass | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/meta/classes/python3targetconfig.bbclass
>>>> b/meta/classes/python3targetconfig.bbclass
>>>> index 640d0c97b6..b79ec211c7 100644
>>>> --- a/meta/classes/python3targetconfig.bbclass
>>>> +++ b/meta/classes/python3targetconfig.bbclass
>>>> @@ -1,6 +1,6 @@
>>>>  inherit python3native
>>>>
>>>> -DEPENDS_append = " python3"
>>>> +DEPENDS_append = "${@['', ' python3']['${CLASSOVERRIDE}' ==
>>>> 'class-target']}"
>>>>
>>>>  do_configure_prepend() {
>>>>          export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
>>>> --
>>>> 2.29.2
>>>>
>>>>

[-- Attachment #2: Type: text/html, Size: 6195 bytes --]

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

* Re: [PATCH] python3targetconfig.bbclass: Add py3 dependecy only for target recipes
  2020-11-17 20:29       ` Martin Jansa
@ 2020-11-17 20:34         ` Alexander Kanavin
  0 siblings, 0 replies; 6+ messages in thread
From: Alexander Kanavin @ 2020-11-17 20:34 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Khem Raj, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 5162 bytes --]

No, it had always worked. _PYTHON_SYSCONFIGDATA_NAME shouldn't be exported
without a dependency on target python3, if you are building for the target,
but if you are building for native via BBCLASSEXTEND, it fell back
correctly to sysconfigdata provided by native python.

Alex

On Tue, 17 Nov 2020 at 21:29, Martin Jansa <martin.jansa@gmail.com> wrote:

> BBCLASSEXTEND was also a bit broken, right? You said that
> _PYTHON_SYSCONFIGDATA_NAME shouldn't be exported without a dependency on
> target python3 which the BBCLASSEXTENDed native didn't get.
>
> On Tue, Nov 17, 2020 at 6:45 PM Alexander Kanavin <alex.kanavin@gmail.com>
> wrote:
>
>> The commit description should be adjusted to drop mention of
>> BBCLASSEXTEND, the problem does not happen there.
>>
>> Also note my comment in the other thread.
>>
>> Alex
>>
>> On Tue, 17 Nov 2020 at 17:42, Martin Jansa <martin.jansa@gmail.com>
>> wrote:
>>
>>> Errm, I meant:
>>>
>>> EXTRA_PYTHON_DEPENDS ?= ""
>>> EXTRA_PYTHON_DEPENDS_class-target = "python3"
>>> DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"
>>>
>>> On Tue, Nov 17, 2020 at 5:41 PM Martin Jansa <martin.jansa@gmail.com>
>>> wrote:
>>>
>>>> Do we need to export _PYTHON_SYSCONFIGDATA_NAME for non-target cases?
>>>>
>>>> And instead of:
>>>> DEPENDS_append = "${@['', ' python3']['${CLASSOVERRIDE}' ==
>>>> 'class-target']}"
>>>>
>>>> I would use intermediate variable like
>>>> EXTRA_PYTHON_DEPENDS = "python3"
>>>> EXTRA_PYTHON_DEPENDS_class-target = ""
>>>> DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"
>>>>
>>>> I know it's just personal preference, but in this case with small
>>>> benefit to undo the append if you really don't want it added for some
>>>> mysterious reason.
>>>>
>>>> On Tue, Nov 17, 2020 at 4:34 PM Khem Raj <raj.khem@gmail.com> wrote:
>>>>
>>>>> python3targetconfig append target python3 to dependencies
>>>>> unconditionally, and here its inherited unconditionally too but
>>>>> distutils3-base is inherited in BBCLASSEXTEND'ed recipes and other
>>>>> not-target
>>>>> recipes as well. Hence the change added via
>>>>> 9c8f666097802cb594a759989edcf01603a22df3
>>>>> is now bridging the native dependencies with target python3 and thats
>>>>> resulting all sorts of rebuilds for multimachine builds e.g.
>>>>>
>>>>> MACHINE=qemuarm bitbake python3-scons-native
>>>>> MACHINE=qemumips bitbake python3-scons-native
>>>>>
>>>>> results in rebuilds for python3-scons-native
>>>>>
>>>>> bitbake-diffsigs shows
>>>>>
>>>>> Hash for dependent task python/python3-scons-native_3.1.2.bb:do_populate_sysroot
>>>>> changed from
>>>>> 1cdb93193b416477df6faa137e83a967b433c7aa29033146b405153f73f36933 to
>>>>> 3cea1e7cbedd121ecb768fbc291cc4e4d7d3b5c0442897
>>>>> 0e3b97bd058d162065
>>>>>     Hash for dependent task python/python3-scons-native_3.1.2.bb:do_install
>>>>> changed from
>>>>> 8d6018fd03ffc6060a04532dc39a5b7ccca1be026a69d069cb4fb11aef86dd89 to
>>>>> c5f1d173596a8e910f45a2b6e0b4dab96cd0102be4d62bd3156
>>>>> 229cb0f5ebb11
>>>>>         Hash for dependent task python/python3-scons-native_3.1.2.bb:do_compile
>>>>> changed from
>>>>> e3ee4b52a15267e6ae7853ec19a666b2fb62608a597608793336382d1c45f8a0 to
>>>>> 1e582043dfe6b3e00aaa532f363ce6afb37652abe837dac
>>>>> 7cc9769194c43eae1
>>>>>             Hash for dependent task
>>>>> python/python3-scons-native_3.1.2.bb:do_configure changed from
>>>>> 770a4d5a77a96ebd9e1e7368f710bca3f88e3b1266dffa3b2d0360b1e3a81e27 to
>>>>> a366982778b03eee5165c3117ee778f848acdfaa2
>>>>> b346650fbdf114ac70ab57b
>>>>>                 Hash for dependent task
>>>>> python/python3-scons-native_3.1.2.bb:do_prepare_recipe_sysroot
>>>>> changed from
>>>>> 958910037856ff5d5eb2b5162b3cdd02a3a710fc543b933cfeba771ee095cb72 to
>>>>> 474333fb565f908992fd3716
>>>>> 4935aaecf31a79e867826fe634cde4f44171d8e7
>>>>>                     Hash for dependent task python/python3_3.9.0.bb:do_populate_sysroot
>>>>> changed from
>>>>> 7ac1c4fcbb2eacf98d2c32d991751bd2f3c7d55e2e32f2c9e485e7f5975fecf8 to
>>>>> 25dcfe74a95af19cce8df7c29311cc5edbbf6ad
>>>>> 08777e46a6fa6e417c0445018
>>>>>
>>>>> ...
>>>>>
>>>>> Therefore limit inheriting this class only for target recipes.
>>>>>
>>>>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>>>>> Cc: Alexander Kanavin <alex.kanavin@gmail.com>
>>>>> Cc: Martin Jansa <Martin.Jansa@gmail.com>
>>>>> ---
>>>>> v2: Mark depends conditional instead
>>>>>
>>>>>  meta/classes/python3targetconfig.bbclass | 2 +-
>>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/meta/classes/python3targetconfig.bbclass
>>>>> b/meta/classes/python3targetconfig.bbclass
>>>>> index 640d0c97b6..b79ec211c7 100644
>>>>> --- a/meta/classes/python3targetconfig.bbclass
>>>>> +++ b/meta/classes/python3targetconfig.bbclass
>>>>> @@ -1,6 +1,6 @@
>>>>>  inherit python3native
>>>>>
>>>>> -DEPENDS_append = " python3"
>>>>> +DEPENDS_append = "${@['', ' python3']['${CLASSOVERRIDE}' ==
>>>>> 'class-target']}"
>>>>>
>>>>>  do_configure_prepend() {
>>>>>          export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
>>>>> --
>>>>> 2.29.2
>>>>>
>>>>>

[-- Attachment #2: Type: text/html, Size: 6895 bytes --]

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

end of thread, other threads:[~2020-11-17 20:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 15:34 [PATCH] python3targetconfig.bbclass: Add py3 dependecy only for target recipes Khem Raj
2020-11-17 16:41 ` Martin Jansa
2020-11-17 16:42   ` Martin Jansa
2020-11-17 17:45     ` Alexander Kanavin
2020-11-17 20:29       ` Martin Jansa
2020-11-17 20:34         ` Alexander Kanavin

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.