All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] distutils3-base.bbclass: Inherit python3targetconfig only for target recipes
@ 2020-11-17  6:55 Khem Raj
  2020-11-17  8:53 ` Alexander Kanavin
       [not found] ` <16483F9996935210.960@lists.openembedded.org>
  0 siblings, 2 replies; 10+ messages in thread
From: Khem Raj @ 2020-11-17  6:55 UTC (permalink / raw
  To: openembedded-core; +Cc: Khem Raj, Alexander Kanavin

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>
---
 meta/classes/distutils3-base.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/classes/distutils3-base.bbclass b/meta/classes/distutils3-base.bbclass
index a277d1c7bc..882db9f605 100644
--- a/meta/classes/distutils3-base.bbclass
+++ b/meta/classes/distutils3-base.bbclass
@@ -1,5 +1,4 @@
 DEPENDS  += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES') == '')]}"
 RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}"
 
-inherit distutils-common-base python3native python3targetconfig
-
+inherit distutils-common-base python3native ${@['python3targetconfig', '']['${CLASSOVERRIDE}' == 'class-target']}
-- 
2.29.2


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

* Re: [PATCH] distutils3-base.bbclass: Inherit python3targetconfig only for target recipes
  2020-11-17  6:55 [PATCH] distutils3-base.bbclass: Inherit python3targetconfig only for target recipes Khem Raj
@ 2020-11-17  8:53 ` Alexander Kanavin
  2020-11-17  9:12   ` [OE-core] " Martin Jansa
       [not found] ` <16483F9996935210.960@lists.openembedded.org>
  1 sibling, 1 reply; 10+ messages in thread
From: Alexander Kanavin @ 2020-11-17  8:53 UTC (permalink / raw
  To: Khem Raj; +Cc: OE-core

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

This explanation does not seem right. The class only sets

inherit python3native
DEPENDS_append = " python3"

which should not drag in target python when it is inherited from -native
recipes, only python3-native.

Alex

On Tue, 17 Nov 2020 at 07:55, 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>
> ---
>  meta/classes/distutils3-base.bbclass | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/meta/classes/distutils3-base.bbclass
> b/meta/classes/distutils3-base.bbclass
> index a277d1c7bc..882db9f605 100644
> --- a/meta/classes/distutils3-base.bbclass
> +++ b/meta/classes/distutils3-base.bbclass
> @@ -1,5 +1,4 @@
>  DEPENDS  += "${@["${PYTHON_PN}-native ${PYTHON_PN}",
> ""][(d.getVar('PACKAGES') == '')]}"
>  RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' ==
> 'class-target']}"
>
> -inherit distutils-common-base python3native python3targetconfig
> -
> +inherit distutils-common-base python3native ${@['python3targetconfig',
> '']['${CLASSOVERRIDE}' == 'class-target']}
> --
> 2.29.2
>
>

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

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

* Re: [OE-core] [PATCH] distutils3-base.bbclass: Inherit python3targetconfig only for target recipes
       [not found] ` <16483F9996935210.960@lists.openembedded.org>
@ 2020-11-17  8:59   ` Alexander Kanavin
  0 siblings, 0 replies; 10+ messages in thread
From: Alexander Kanavin @ 2020-11-17  8:59 UTC (permalink / raw
  To: OE-core, Khem Raj

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

I think the correct fix here would be to fold python3-scons-native_bb into
the main recipe using BBCLASSEXTEND, so DEPENDS gets properly rewritten.

Alex

On Tue, 17 Nov 2020 at 09:53, Alexander Kanavin via lists.openembedded.org
<alex.kanavin=gmail.com@lists.openembedded.org> wrote:

> This explanation does not seem right. The class only sets
>
> inherit python3native
> DEPENDS_append = " python3"
>
> which should not drag in target python when it is inherited from -native
> recipes, only python3-native.
>
> Alex
>
> On Tue, 17 Nov 2020 at 07:55, 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>
>> ---
>>  meta/classes/distutils3-base.bbclass | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/meta/classes/distutils3-base.bbclass
>> b/meta/classes/distutils3-base.bbclass
>> index a277d1c7bc..882db9f605 100644
>> --- a/meta/classes/distutils3-base.bbclass
>> +++ b/meta/classes/distutils3-base.bbclass
>> @@ -1,5 +1,4 @@
>>  DEPENDS  += "${@["${PYTHON_PN}-native ${PYTHON_PN}",
>> ""][(d.getVar('PACKAGES') == '')]}"
>>  RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' ==
>> 'class-target']}"
>>
>> -inherit distutils-common-base python3native python3targetconfig
>> -
>> +inherit distutils-common-base python3native ${@['python3targetconfig',
>> '']['${CLASSOVERRIDE}' == 'class-target']}
>> --
>> 2.29.2
>>
>>
> 
>
>

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

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

* Re: [OE-core] [PATCH] distutils3-base.bbclass: Inherit python3targetconfig only for target recipes
  2020-11-17  8:53 ` Alexander Kanavin
@ 2020-11-17  9:12   ` Martin Jansa
  2020-11-17  9:18     ` Alexander Kanavin
  0 siblings, 1 reply; 10+ messages in thread
From: Martin Jansa @ 2020-11-17  9:12 UTC (permalink / raw
  To: Alexander Kanavin; +Cc: Khem Raj, OE-core

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

You mean that in BBCLASSEXTEND'ed recipes mentioned in the explanation it
should work and only the recipes which directly inherit native, like
meta/recipes-devtools/python/python3-scons-native_3.1.2.bb
are broken?

On Tue, Nov 17, 2020 at 9:53 AM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> This explanation does not seem right. The class only sets
>
> inherit python3native
> DEPENDS_append = " python3"
>
> which should not drag in target python when it is inherited from -native
> recipes, only python3-native.
>
> Alex
>
> On Tue, 17 Nov 2020 at 07:55, 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>
>> ---
>>  meta/classes/distutils3-base.bbclass | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/meta/classes/distutils3-base.bbclass
>> b/meta/classes/distutils3-base.bbclass
>> index a277d1c7bc..882db9f605 100644
>> --- a/meta/classes/distutils3-base.bbclass
>> +++ b/meta/classes/distutils3-base.bbclass
>> @@ -1,5 +1,4 @@
>>  DEPENDS  += "${@["${PYTHON_PN}-native ${PYTHON_PN}",
>> ""][(d.getVar('PACKAGES') == '')]}"
>>  RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' ==
>> 'class-target']}"
>>
>> -inherit distutils-common-base python3native python3targetconfig
>> -
>> +inherit distutils-common-base python3native ${@['python3targetconfig',
>> '']['${CLASSOVERRIDE}' == 'class-target']}
>> --
>> 2.29.2
>>
>>
> 
>
>

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

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

* Re: [OE-core] [PATCH] distutils3-base.bbclass: Inherit python3targetconfig only for target recipes
  2020-11-17  9:12   ` [OE-core] " Martin Jansa
@ 2020-11-17  9:18     ` Alexander Kanavin
  2020-11-17 15:40       ` Khem Raj
  0 siblings, 1 reply; 10+ messages in thread
From: Alexander Kanavin @ 2020-11-17  9:18 UTC (permalink / raw
  To: Martin Jansa; +Cc: Khem Raj, OE-core

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

Yes - and if python3-scons-native is the only such recipe we can find, I
think it's better to merge the recipe with the target one.

Alex

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

> You mean that in BBCLASSEXTEND'ed recipes mentioned in the explanation it
> should work and only the recipes which directly inherit native, like
> meta/recipes-devtools/python/python3-scons-native_3.1.2.bb
> are broken?
>
> On Tue, Nov 17, 2020 at 9:53 AM Alexander Kanavin <alex.kanavin@gmail.com>
> wrote:
>
>> This explanation does not seem right. The class only sets
>>
>> inherit python3native
>> DEPENDS_append = " python3"
>>
>> which should not drag in target python when it is inherited from -native
>> recipes, only python3-native.
>>
>> Alex
>>
>> On Tue, 17 Nov 2020 at 07:55, 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>
>>> ---
>>>  meta/classes/distutils3-base.bbclass | 3 +--
>>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/meta/classes/distutils3-base.bbclass
>>> b/meta/classes/distutils3-base.bbclass
>>> index a277d1c7bc..882db9f605 100644
>>> --- a/meta/classes/distutils3-base.bbclass
>>> +++ b/meta/classes/distutils3-base.bbclass
>>> @@ -1,5 +1,4 @@
>>>  DEPENDS  += "${@["${PYTHON_PN}-native ${PYTHON_PN}",
>>> ""][(d.getVar('PACKAGES') == '')]}"
>>>  RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' ==
>>> 'class-target']}"
>>>
>>> -inherit distutils-common-base python3native python3targetconfig
>>> -
>>> +inherit distutils-common-base python3native ${@['python3targetconfig',
>>> '']['${CLASSOVERRIDE}' == 'class-target']}
>>> --
>>> 2.29.2
>>>
>>>
>> 
>>
>>

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

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

* Re: [OE-core] [PATCH] distutils3-base.bbclass: Inherit python3targetconfig only for target recipes
  2020-11-17  9:18     ` Alexander Kanavin
@ 2020-11-17 15:40       ` Khem Raj
  2020-11-17 17:33         ` Alexander Kanavin
  0 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2020-11-17 15:40 UTC (permalink / raw
  To: Alexander Kanavin; +Cc: Martin Jansa, OE-core

On Tue, Nov 17, 2020 at 1:19 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> Yes - and if python3-scons-native is the only such recipe we can find, I think it's better to merge the recipe with the target one.
>
python3-scons-native is just a manifestation of a larger problem which
is a regression and this suggestion compounds the problem by setting
an unequal rule where non-python packages can
have a native-recipe and recipe but python ones can not, therefore we
need to fix this properly in core classes instead.

> Alex
>
> On Tue, 17 Nov 2020 at 10:12, Martin Jansa <martin.jansa@gmail.com> wrote:
>>
>> You mean that in BBCLASSEXTEND'ed recipes mentioned in the explanation it should work and only the recipes which directly inherit native, like
>> meta/recipes-devtools/python/python3-scons-native_3.1.2.bb
>> are broken?
>>
>> On Tue, Nov 17, 2020 at 9:53 AM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>>>
>>> This explanation does not seem right. The class only sets
>>>
>>> inherit python3native
>>> DEPENDS_append = " python3"
>>>
>>> which should not drag in target python when it is inherited from -native recipes, only python3-native.
>>>
>>> Alex
>>>
>>> On Tue, 17 Nov 2020 at 07:55, 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>
>>>> ---
>>>>  meta/classes/distutils3-base.bbclass | 3 +--
>>>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>>>
>>>> diff --git a/meta/classes/distutils3-base.bbclass b/meta/classes/distutils3-base.bbclass
>>>> index a277d1c7bc..882db9f605 100644
>>>> --- a/meta/classes/distutils3-base.bbclass
>>>> +++ b/meta/classes/distutils3-base.bbclass
>>>> @@ -1,5 +1,4 @@
>>>>  DEPENDS  += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES') == '')]}"
>>>>  RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}"
>>>>
>>>> -inherit distutils-common-base python3native python3targetconfig
>>>> -
>>>> +inherit distutils-common-base python3native ${@['python3targetconfig', '']['${CLASSOVERRIDE}' == 'class-target']}
>>>> --
>>>> 2.29.2
>>>>
>>>
>>> 
>>>

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

* Re: [OE-core] [PATCH] distutils3-base.bbclass: Inherit python3targetconfig only for target recipes
  2020-11-17 15:40       ` Khem Raj
@ 2020-11-17 17:33         ` Alexander Kanavin
  2020-11-17 18:08           ` Khem Raj
  0 siblings, 1 reply; 10+ messages in thread
From: Alexander Kanavin @ 2020-11-17 17:33 UTC (permalink / raw
  To: Khem Raj; +Cc: Martin Jansa, OE-core

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

On Tue, 17 Nov 2020 at 16:41, Khem Raj <raj.khem@gmail.com> wrote:

> On Tue, Nov 17, 2020 at 1:19 AM Alexander Kanavin
> <alex.kanavin@gmail.com> wrote:
> >
> > Yes - and if python3-scons-native is the only such recipe we can find, I
> think it's better to merge the recipe with the target one.
> >
> python3-scons-native is just a manifestation of a larger problem which
> is a regression and this suggestion compounds the problem by setting
> an unequal rule where non-python packages can
> have a native-recipe and recipe but python ones can not, therefore we
> need to fix this properly in core classes instead.
>

If non-python native-only recipes inherit something that DEPENDS on a
target item, they will have the exact same problem. This is what needs
fixing - but not by special-casing DEPENDS in every class where it happens,
or might happen.

I'd rather convert all native-only recipes to target ones + BBCLASSEXTEND,
so it works the same way everywhere, and minimizes surprises.

Alex

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

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

* Re: [OE-core] [PATCH] distutils3-base.bbclass: Inherit python3targetconfig only for target recipes
  2020-11-17 17:33         ` Alexander Kanavin
@ 2020-11-17 18:08           ` Khem Raj
  2020-11-17 20:00             ` Martin Jansa
  0 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2020-11-17 18:08 UTC (permalink / raw
  To: Alexander Kanavin; +Cc: Martin Jansa, OE-core

On Tue, Nov 17, 2020 at 9:33 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> On Tue, 17 Nov 2020 at 16:41, Khem Raj <raj.khem@gmail.com> wrote:
>>
>> On Tue, Nov 17, 2020 at 1:19 AM Alexander Kanavin
>> <alex.kanavin@gmail.com> wrote:
>> >
>> > Yes - and if python3-scons-native is the only such recipe we can find, I think it's better to merge the recipe with the target one.
>> >
>> python3-scons-native is just a manifestation of a larger problem which
>> is a regression and this suggestion compounds the problem by setting
>> an unequal rule where non-python packages can
>> have a native-recipe and recipe but python ones can not, therefore we
>> need to fix this properly in core classes instead.
>
>
> If non-python native-only recipes inherit something that DEPENDS on a target item, they will have the exact same problem. This is what needs fixing - but not by special-casing DEPENDS in every class where it happens, or might happen.
>

keep this issue aside and think in a generic way about how recipes can
be written regardless of native or not. behavior has to be consistent

> I'd rather convert all native-only recipes to target ones + BBCLASSEXTEND, so it works the same way everywhere, and minimizes surprises.
>

that's wishful, there are a lot of layers that will have to also
change, and we have to change the semantics of native recipes where
BBCLASSEXTEND is the only way to do them.


> Alex
>

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

* Re: [OE-core] [PATCH] distutils3-base.bbclass: Inherit python3targetconfig only for target recipes
  2020-11-17 18:08           ` Khem Raj
@ 2020-11-17 20:00             ` Martin Jansa
  2020-11-17 22:08               ` Khem Raj
  0 siblings, 1 reply; 10+ messages in thread
From: Martin Jansa @ 2020-11-17 20:00 UTC (permalink / raw
  To: Khem Raj; +Cc: Alexander Kanavin, OE-core

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

And there are some cases where we need only native recipe and creating a
target one just to BBCLASSEXTEND seems worse than the current state with
native.bbclass.

Or there are some cases where the native build is so significantly
different from the target one, that using BBCLASSEXTEND just makes it more
difficult to read without any benefit.

So please don't remove the option to just inherit native if there aren't
any technical reasons to do that.

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

> On Tue, Nov 17, 2020 at 9:33 AM Alexander Kanavin
> <alex.kanavin@gmail.com> wrote:
> >
> > On Tue, 17 Nov 2020 at 16:41, Khem Raj <raj.khem@gmail.com> wrote:
> >>
> >> On Tue, Nov 17, 2020 at 1:19 AM Alexander Kanavin
> >> <alex.kanavin@gmail.com> wrote:
> >> >
> >> > Yes - and if python3-scons-native is the only such recipe we can
> find, I think it's better to merge the recipe with the target one.
> >> >
> >> python3-scons-native is just a manifestation of a larger problem which
> >> is a regression and this suggestion compounds the problem by setting
> >> an unequal rule where non-python packages can
> >> have a native-recipe and recipe but python ones can not, therefore we
> >> need to fix this properly in core classes instead.
> >
> >
> > If non-python native-only recipes inherit something that DEPENDS on a
> target item, they will have the exact same problem. This is what needs
> fixing - but not by special-casing DEPENDS in every class where it happens,
> or might happen.
> >
>
> keep this issue aside and think in a generic way about how recipes can
> be written regardless of native or not. behavior has to be consistent
>
> > I'd rather convert all native-only recipes to target ones +
> BBCLASSEXTEND, so it works the same way everywhere, and minimizes surprises.
> >
>
> that's wishful, there are a lot of layers that will have to also
> change, and we have to change the semantics of native recipes where
> BBCLASSEXTEND is the only way to do them.
>
>
> > Alex
> >
>

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

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

* Re: [OE-core] [PATCH] distutils3-base.bbclass: Inherit python3targetconfig only for target recipes
  2020-11-17 20:00             ` Martin Jansa
@ 2020-11-17 22:08               ` Khem Raj
  0 siblings, 0 replies; 10+ messages in thread
From: Khem Raj @ 2020-11-17 22:08 UTC (permalink / raw
  To: Martin Jansa; +Cc: Alexander Kanavin, OE-core

On Tue, Nov 17, 2020 at 12:00 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> And there are some cases where we need only native recipe and creating a target one just to BBCLASSEXTEND seems worse than the current state with native.bbclass.
>
> Or there are some cases where the native build is so significantly different from the target one, that using BBCLASSEXTEND just makes it more difficult to read without any benefit.
>
> So please don't remove the option to just inherit native if there aren't any technical reasons to do that.
>

I think we have a patch to address the fallout so we should be good here now.

> On Tue, Nov 17, 2020 at 7:09 PM Khem Raj <raj.khem@gmail.com> wrote:
>>
>> On Tue, Nov 17, 2020 at 9:33 AM Alexander Kanavin
>> <alex.kanavin@gmail.com> wrote:
>> >
>> > On Tue, 17 Nov 2020 at 16:41, Khem Raj <raj.khem@gmail.com> wrote:
>> >>
>> >> On Tue, Nov 17, 2020 at 1:19 AM Alexander Kanavin
>> >> <alex.kanavin@gmail.com> wrote:
>> >> >
>> >> > Yes - and if python3-scons-native is the only such recipe we can find, I think it's better to merge the recipe with the target one.
>> >> >
>> >> python3-scons-native is just a manifestation of a larger problem which
>> >> is a regression and this suggestion compounds the problem by setting
>> >> an unequal rule where non-python packages can
>> >> have a native-recipe and recipe but python ones can not, therefore we
>> >> need to fix this properly in core classes instead.
>> >
>> >
>> > If non-python native-only recipes inherit something that DEPENDS on a target item, they will have the exact same problem. This is what needs fixing - but not by special-casing DEPENDS in every class where it happens, or might happen.
>> >
>>
>> keep this issue aside and think in a generic way about how recipes can
>> be written regardless of native or not. behavior has to be consistent
>>
>> > I'd rather convert all native-only recipes to target ones + BBCLASSEXTEND, so it works the same way everywhere, and minimizes surprises.
>> >
>>
>> that's wishful, there are a lot of layers that will have to also
>> change, and we have to change the semantics of native recipes where
>> BBCLASSEXTEND is the only way to do them.
>>
>>
>> > Alex
>> >

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

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

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-17  6:55 [PATCH] distutils3-base.bbclass: Inherit python3targetconfig only for target recipes Khem Raj
2020-11-17  8:53 ` Alexander Kanavin
2020-11-17  9:12   ` [OE-core] " Martin Jansa
2020-11-17  9:18     ` Alexander Kanavin
2020-11-17 15:40       ` Khem Raj
2020-11-17 17:33         ` Alexander Kanavin
2020-11-17 18:08           ` Khem Raj
2020-11-17 20:00             ` Martin Jansa
2020-11-17 22:08               ` Khem Raj
     [not found] ` <16483F9996935210.960@lists.openembedded.org>
2020-11-17  8:59   ` 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.