python3targetconfig.bbclass: Make py3 dep and tasks only for target recipes
PATCH v3 1/1 python3targetconfig.bbclass: Make py3 dep and tasks only for target recipes
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 25dcfe74a95af19cce8df7c29311cc5edbbf6ad08777e46a6fa6e417c0445018
...
Therefore limit effects of this class only for target recipes.
---
v2: Mark depends conditional instead
v3: Export _PYTHON_SYSCONFIGDATA_NAME only for target
and mark tasks with target override
meta/classes/python3targetconfig.bbclass | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
meta/classes/python3targetconfig.bbclass +6 -4
@@ -1,15 +1,17 @@ inherit python3native -DEPENDS_append = " python3" +EXTRA_PYTHON_DEPENDS ?= "" +EXTRA_PYTHON_DEPENDS_class-target = "python3" +DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}" -do_configure_prepend() { +do_configure_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } -do_compile_prepend() { +do_compile_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } -do_install_prepend() { +do_install_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" }
--
2.29.2
Khem Raj <[email protected]> escreveu no dia terça, 17/11/2020 à(s) 18:04:
Quoted 48 lines
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
9c8f666097802cb594a759989edcf01603a22df3is 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-nativeresults 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
1cdb93193b416477df6faa137e83a967b433c7aa29033146b405153f73f36933to3cea1e7cbedd121ecb768fbc291cc4e4d7d3b5c04428970e3b97bd058d162065Hash 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 effects of this class only for target recipes.
Signed-off-by Khem Raj <[email protected]>Cc Alexander Kanavin <[email protected]>Cc Martin Jansa <[email protected]>---
v2: Mark depends conditional instead
v3: Export_PYTHON_SYSCONFIGDATA_NAMEonly for target
and mark tasks with target overridemeta/classes/python3targetconfig.bbclass | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)meta/classes/python3targetconfig.bbclass +0
-0
meta/classes/python3targetconfig.bbclass line 5
Quoted 6 lines
meta/classes/python3targetconfig.bbclass +3
-1@@ -1,15 +1,17 @@ inherit python3native -DEPENDS_append = " python3" +EXTRA_PYTHON_DEPENDS ?= "" +EXTRA_PYTHON_DEPENDS_class-target = "python3" +DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"
-EXTRA_PYTHON_DEPENDS_class-target = "python3"
-DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"
+EXTRA_PYTHON_DEPENDS_class-target = " python3"
+DEPENDS_append = "${EXTRA_PYTHON_DEPENDS}"
add a space before python3 is better than always add it to DEPENDS
Quoted 20 lines
meta/classes/python3targetconfig.bbclass +3
-4-do_configure_prepend() { +do_configure_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } -do_compile_prepend() { +do_compile_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } -do_install_prepend() { +do_install_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } --2.29.2
Signature · 2 lines
best regards, José Quaresma
I don't mind this change, but why do you think space in the variable is better in this case (where we don't mind extra space being added for native/nativesdk case?)
If someone sets EXTRA_PYTHON_DEPENDS = "foo" for whatever reason in some recipe, then the space will be missing.
Quoted 111 lines · Jose Quaresma
Khem Raj <[email protected]> escreveu no dia terça, 17/11/2020 à(s) 18:04:
Quoted 4 lines
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
Quoted 1 line
recipes as well. Hence the change added via
9c8f666097802cb594a759989edcf01603a22df3Quoted 11 lines
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-nativeresults 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
1cdb93193b416477df6faa137e83a967b433c7aa29033146b405153f73f36933to3cea1e7cbedd121ecb768fbc291cc4e4d7d3b5c0442897Quoted 2 lines
0e3b97bd058d162065
Hash for dependent task python/python3-scons-native_3.1.2.bb:do_installchanged from
8d6018fd03ffc6060a04532dc39a5b7ccca1be026a69d069cb4fb11aef86dd89toc5f1d173596a8e910f45a2b6e0b4dab96cd0102be4d62bd3156Quoted 2 lines
229cb0f5ebb11
Hash for dependent task python/python3-scons-native_3.1.2.bb:do_compilechanged from
e3ee4b52a15267e6ae7853ec19a666b2fb62608a597608793336382d1c45f8a0to1e582043dfe6b3e00aaa532f363ce6afb37652abe837dacQuoted 2 lines
7cc9769194c43eae1
Hash for dependent task python/python3-scons-native_3.1.2.bb:do_configurechanged from
770a4d5a77a96ebd9e1e7368f710bca3f88e3b1266dffa3b2d0360b1e3a81e27toa366982778b03eee5165c3117ee778f848acdfaa2Quoted 2 lines
b346650fbdf114ac70ab57b
Hash for dependent taskpython/python3-scons-native_3.1.2.bb:do_prepare_recipe_sysroot changed from
958910037856ff5d5eb2b5162b3cdd02a3a710fc543b933cfeba771ee095cb72to474333fb565f908992fd3716Quoted 2 lines
4935aaecf31a79e867826fe634cde4f44171d8e7
Hash for dependent task python/python3_3.9.0.bb:do_populate_sysrootchanged from
7ac1c4fcbb2eacf98d2c32d991751bd2f3c7d55e2e32f2c9e485e7f5975fecf8to25dcfe74a95af19cce8df7c29311cc5edbbf6adQuoted 14 lines
08777e46a6fa6e417c0445018...
Therefore limit effects of this class only for target recipes.
Signed-off-by Khem Raj <[email protected]>Cc Alexander Kanavin <[email protected]>Cc Martin Jansa <[email protected]>---
v2: Mark depends conditional instead
v3: Export_PYTHON_SYSCONFIGDATA_NAMEonly for target
and mark tasks with target overrideReview
Quoted 4 lines
meta/classes/python3targetconfig.bbclass | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)(quoted diff) +0
-0b/meta/classes/python3targetconfig.bbclass
Quoted 10 lines
index
640d0c97b6..fc1025c207100644meta/classes/python3targetconfig.bbclass +3
-1@@ -1,15 +1,17 @@ inherit python3native -DEPENDS_append = " python3" +EXTRA_PYTHON_DEPENDS ?= "" +EXTRA_PYTHON_DEPENDS_class-target = "python3" +DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"(quoted diff) +2
-2-EXTRA_PYTHON_DEPENDS_class-target = "python3" -DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}" +EXTRA_PYTHON_DEPENDS_class-target = " python3" +DEPENDS_append = "${EXTRA_PYTHON_DEPENDS}"add a space before python3 is better than always add it to DEPENDS
Quoted 16 lines
meta/classes/python3targetconfig.bbclass +3
-4-do_configure_prepend() { +do_configure_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } -do_compile_prepend() { +do_compile_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } -do_install_prepend() { +do_install_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } --Quoted 4 lines
2.29.2
--
best regards,
José Quaresma
Martin,
you're right. if EXTRA_PYTHON_DEPENDS is set outside of the bbclass it break the DEPENDS.
Sorry Khem for my suggestion, your initial was right.
+EXTRA_PYTHON_DEPENDS_class-target = "python3"
+DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"
But in this case (when EXTRA_PYTHON_DEPENDS is set outside of the bbclass) it will don't have any effect for the overwrite class-target because EXTRA_PYTHON_DEPENDS_class-target="python3" always will set EXTRA_PYTHON_DEPENDS="python3"
I think I have see another problem now and something like this is better:
+EXTRA_PYTHON_DEPENDS_append_class-target = "python3" +DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"
Martin Jansa <[email protected]> escreveu no dia terça, 17/11/2020 à(s) 19:56:
Quoted 95 lines
I don't mind this change, but why do you think space in the variable is better in this case (where we don't mind extra space being added for native/nativesdk case?)
If someone sets
EXTRA_PYTHON_DEPENDS= "foo" for whatever reason in some recipe, then the space will be missing.Quoted 89 lines · Jose Quaresma
Khem Raj <[email protected]> escreveu no dia terça, 17/11/2020 à(s) 18:04:
Quoted 54 lines
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
9c8f666097802cb594a759989edcf01603a22df3is 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-nativeresults 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
1cdb93193b416477df6faa137e83a967b433c7aa29033146b405153f73f36933to3cea1e7cbedd121ecb768fbc291cc4e4d7d3b5c04428970e3b97bd058d162065Hash 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 effects of this class only for target recipes.
Signed-off-by Khem Raj <[email protected]>Cc Alexander Kanavin <[email protected]>Cc Martin Jansa <[email protected]>---
v2: Mark depends conditional instead
v3: Export_PYTHON_SYSCONFIGDATA_NAMEonly for target
and mark tasks with target overridemeta/classes/python3targetconfig.bbclass | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)meta/classes/python3targetconfig.bbclass +3
-1@@ -1,15 +1,17 @@ inherit python3native -DEPENDS_append = " python3" +EXTRA_PYTHON_DEPENDS ?= "" +EXTRA_PYTHON_DEPENDS_class-target = "python3" +DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"(quoted diff) +2
-2-EXTRA_PYTHON_DEPENDS_class-target = "python3" -DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}" +EXTRA_PYTHON_DEPENDS_class-target = " python3" +DEPENDS_append = "${EXTRA_PYTHON_DEPENDS}"add a space before python3 is better than always add it to DEPENDS
Quoted 16 lines
meta/classes/python3targetconfig.bbclass +3
-4-do_configure_prepend() { +do_configure_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } -do_compile_prepend() { +do_compile_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } -do_install_prepend() { +do_install_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } --Quoted 4 lines
2.29.2
--
best regards,
José Quaresma
Signature · 2 lines
best regards, José Quaresma
Then you will need space in:
EXTRA_PYTHON_DEPENDS_append_class-target = " python3" as well.
I don't expect EXTRA_PYTHON_DEPENDS to be often (if at all) outside the bbclass, but IMHO it's good convention to just use leading space wherever you append to space separated list (less surprises for people who might eventually set something like EXTRA_PYTHON_DEPENDS in their recipes - even from wrong reasons).
Quoted 150 lines · Jose Quaresma
Martin,
you're right. if
EXTRA_PYTHON_DEPENDSis set outside of the bbclass it break the DEPENDS.Sorry Khem for my suggestion, your initial was right.
meta/classes/python3targetconfig.bbclass +2
-0+EXTRA_PYTHON_DEPENDS_class-target = "python3" +DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"But in this case (when
EXTRA_PYTHON_DEPENDSis set outside of the bbclass) it will don't have any effect for the overwrite class-target because EXTRA_PYTHON_DEPENDS_class-target="python3" always will set EXTRA_PYTHON_DEPENDS="python3"I think I have see another problem now and something like this is better:
(quoted diff) +2
-0+EXTRA_PYTHON_DEPENDS_append_class-target = "python3" +DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"Martin Jansa <[email protected]> escreveu no dia terça, 17/11/2020 à(s) 19:56:
Quoted 2 lines
I don't mind this change, but why do you think space in the variable is
better in this case (where we don't mind extra space being added for native/nativesdk case?)
Quoted 2 lines
If someone sets
EXTRA_PYTHON_DEPENDS= "foo" for whatever reason in somerecipe, then the space will be missing.
Quoted 2 lines
On Tue, Nov 17, 2020 at 7:36 PM Jose Quaresma <[email protected]>
Quoted 2 lines · wrote:
Quoted 2 lines
Khem Raj <[email protected]> escreveu no dia terça, 17/11/2020 à(s)
18:04:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
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
Quoted 1 line
Quoted 1 line
Quoted 1 line
recipes as well. Hence the change added via
9c8f666097802cb594a759989edcf01603a22df3Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
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-nativeresults 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
1cdb93193b416477df6faa137e83a967b433c7aa29033146b405153f73f36933to3cea1e7cbedd121ecb768fbc291cc4e4d7d3b5c0442897Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0e3b97bd058d162065
Hash for dependent task python/python3-scons-native_3.1.2.bb:do_installchanged from
8d6018fd03ffc6060a04532dc39a5b7ccca1be026a69d069cb4fb11aef86dd89toc5f1d173596a8e910f45a2b6e0b4dab96cd0102be4d62bd3156Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
229cb0f5ebb11
Hash for dependent task python/python3-scons-native_3.1.2.bb:do_compilechanged from
e3ee4b52a15267e6ae7853ec19a666b2fb62608a597608793336382d1c45f8a0to1e582043dfe6b3e00aaa532f363ce6afb37652abe837dacQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
7cc9769194c43eae1
Hash for dependent taskpython/python3-scons-native_3.1.2.bb:do_configure changed from
770a4d5a77a96ebd9e1e7368f710bca3f88e3b1266dffa3b2d0360b1e3a81e27toa366982778b03eee5165c3117ee778f848acdfaa2Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
b346650fbdf114ac70ab57b
Hash for dependent taskpython/python3-scons-native_3.1.2.bb:do_prepare_recipe_sysroot changed from
958910037856ff5d5eb2b5162b3cdd02a3a710fc543b933cfeba771ee095cb72to474333fb565f908992fd3716Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
4935aaecf31a79e867826fe634cde4f44171d8e7
Hash for dependent task python/python3_3.9.0.bb:do_populate_sysrootchanged from
7ac1c4fcbb2eacf98d2c32d991751bd2f3c7d55e2e32f2c9e485e7f5975fecf8to25dcfe74a95af19cce8df7c29311cc5edbbf6adQuoted 14 lines
Quoted 14 lines
Quoted 14 lines
08777e46a6fa6e417c0445018...
Therefore limit effects of this class only for target recipes.
Signed-off-by Khem Raj <[email protected]>Cc Alexander Kanavin <[email protected]>Cc Martin Jansa <[email protected]>---
v2: Mark depends conditional instead
v3: Export_PYTHON_SYSCONFIGDATA_NAMEonly for target
and mark tasks with target overrideQuoted 4 lines
Quoted 4 lines
Review
Quoted 4 lines
meta/classes/python3targetconfig.bbclass | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)(quoted diff) +0
-0b/meta/classes/python3targetconfig.bbclass
Quoted 29 lines
Quoted 29 lines
Quoted 10 lines
index
640d0c97b6..fc1025c207100644meta/classes/python3targetconfig.bbclass +3
-1@@ -1,15 +1,17 @@ inherit python3native -DEPENDS_append = " python3" +EXTRA_PYTHON_DEPENDS ?= "" +EXTRA_PYTHON_DEPENDS_class-target = "python3" +DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"(quoted diff) +2
-2-EXTRA_PYTHON_DEPENDS_class-target = "python3" -DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}" +EXTRA_PYTHON_DEPENDS_class-target = " python3" +DEPENDS_append = "${EXTRA_PYTHON_DEPENDS}"add a space before python3 is better than always add it to DEPENDS
Quoted 11 lines
meta/classes/python3targetconfig.bbclass +2
-2-do_configure_prepend() { +do_configure_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } -do_compile_prepend() { +do_compile_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" }Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
meta/classes/python3targetconfig.bbclass +1
-2-do_install_prepend() { +do_install_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } --2.29.2
Quoted 8 lines
Quoted 3 lines
--
best regards,
José Quaresma--
best regards,
José Quaresma
Martin Jansa <[email protected]> escreveu no dia terça, 17/11/2020 à(s) 20:24:
Quoted 4 lines
Then you will need space in:
EXTRA_PYTHON_DEPENDS_append_class-target = " python3" as well.
right.
Quoted 3 lines
I don't expect
EXTRA_PYTHON_DEPENDSto be often (if at all) outside the bbclass, but IMHO it's good convention to just use leading space wherever you append to space separated list (less surprises for people who might eventually set something likeEXTRA_PYTHON_DEPENDSin their recipes - even from wrong reasons).
if EXTRA_PYTHON_DEPENDS is don't expect to be often (if at all) outside the bbclass, a clean solution can be:
-DEPENDS_append = " python3"
+DEPENDS_append_class-target = " python3"
Quoted 125 lines · Jose Quaresma
Quoted 124 lines
Martin,
you're right. if
EXTRA_PYTHON_DEPENDSis set outside of the bbclass it break the DEPENDS.Sorry Khem for my suggestion, your initial was right.
meta/classes/python3targetconfig.bbclass +2
-0+EXTRA_PYTHON_DEPENDS_class-target = "python3" +DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"But in this case (when
EXTRA_PYTHON_DEPENDSis set outside of the bbclass) it will don't have any effect for the overwrite class-target because EXTRA_PYTHON_DEPENDS_class-target="python3" always will set EXTRA_PYTHON_DEPENDS="python3"I think I have see another problem now and something like this is better:
(quoted diff) +2
-0+EXTRA_PYTHON_DEPENDS_append_class-target = "python3" +DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"Martin Jansa <[email protected]> escreveu no dia terça, 17/11/2020 à(s) 19:56:
Quoted 95 lines
I don't mind this change, but why do you think space in the variable is better in this case (where we don't mind extra space being added for native/nativesdk case?)
If someone sets
EXTRA_PYTHON_DEPENDS= "foo" for whatever reason in some recipe, then the space will be missing.Quoted 89 lines · Jose Quaresma
Khem Raj <[email protected]> escreveu no dia terça, 17/11/2020 à(s) 18:04:
Quoted 54 lines
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
9c8f666097802cb594a759989edcf01603a22df3is 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-nativeresults 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
1cdb93193b416477df6faa137e83a967b433c7aa29033146b405153f73f36933to3cea1e7cbedd121ecb768fbc291cc4e4d7d3b5c04428970e3b97bd058d162065Hash 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 effects of this class only for target recipes.
Signed-off-by Khem Raj <[email protected]>Cc Alexander Kanavin <[email protected]>Cc Martin Jansa <[email protected]>---
v2: Mark depends conditional instead
v3: Export_PYTHON_SYSCONFIGDATA_NAMEonly for target
and mark tasks with target overridemeta/classes/python3targetconfig.bbclass | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)meta/classes/python3targetconfig.bbclass +3
-1@@ -1,15 +1,17 @@ inherit python3native -DEPENDS_append = " python3" +EXTRA_PYTHON_DEPENDS ?= "" +EXTRA_PYTHON_DEPENDS_class-target = "python3" +DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"(quoted diff) +2
-2-EXTRA_PYTHON_DEPENDS_class-target = "python3" -DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}" +EXTRA_PYTHON_DEPENDS_class-target = " python3" +DEPENDS_append = "${EXTRA_PYTHON_DEPENDS}"add a space before python3 is better than always add it to DEPENDS
Quoted 16 lines
meta/classes/python3targetconfig.bbclass +3
-4-do_configure_prepend() { +do_configure_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } -do_compile_prepend() { +do_compile_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } -do_install_prepend() { +do_install_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } --Quoted 4 lines
2.29.2
--
best regards,
José Quaresma--
best regards,
José Quaresma
Signature · 2 lines
best regards, José Quaresma
Quoted 13 lines · Jose Quaresma
Martin Jansa <[email protected]> escreveu no dia terça, 17/11/2020 à(s) 20:24:
Quoted 4 lines
Then you will need space in:
EXTRA_PYTHON_DEPENDS_append_class-target = " python3" as well.right.
Quoted 3 lines
I don't expect
EXTRA_PYTHON_DEPENDSto be often (if at all) outside the bbclass, but IMHO it's good convention to just use leading space wherever you append to space separated list (less surprises for people who might eventually set something likeEXTRA_PYTHON_DEPENDSin their recipes - even from wrong reasons).
I think that's fine reason, I am not too hard on it but I have sent a v5 which reverts to original spaces. Hopefully this will be final rev.
Quoted 138 lines
if
EXTRA_PYTHON_DEPENDSis don't expect to be often (if at all) outside the bbclass, a clean solution can be:(quoted diff) +1
-1-DEPENDS_append = " python3" +DEPENDS_append_class-target = " python3"Quoted 123 lines · Jose Quaresma
Quoted 121 lines
Martin,
you're right. if
EXTRA_PYTHON_DEPENDSis set outside of the bbclass it break the DEPENDS.Sorry Khem for my suggestion, your initial was right.
meta/classes/python3targetconfig.bbclass +2
-0+EXTRA_PYTHON_DEPENDS_class-target = "python3" +DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"But in this case (when
EXTRA_PYTHON_DEPENDSis set outside of the bbclass) it will don't have any effect for the overwrite class-target because EXTRA_PYTHON_DEPENDS_class-target="python3" always will set EXTRA_PYTHON_DEPENDS="python3"I think I have see another problem now and something like this is better:
(quoted diff) +2
-0+EXTRA_PYTHON_DEPENDS_append_class-target = "python3" +DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"Martin Jansa <[email protected]> escreveu no dia terça, 17/11/2020 à(s) 19:56:
Quoted 95 lines
I don't mind this change, but why do you think space in the variable is better in this case (where we don't mind extra space being added for native/nativesdk case?)
If someone sets
EXTRA_PYTHON_DEPENDS= "foo" for whatever reason in some recipe, then the space will be missing.Quoted 89 lines · Jose Quaresma
Khem Raj <[email protected]> escreveu no dia terça, 17/11/2020 à(s) 18:04:
Quoted 54 lines
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
9c8f666097802cb594a759989edcf01603a22df3is 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-nativeresults 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
1cdb93193b416477df6faa137e83a967b433c7aa29033146b405153f73f36933to3cea1e7cbedd121ecb768fbc291cc4e4d7d3b5c04428970e3b97bd058d162065Hash 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 effects of this class only for target recipes.
Signed-off-by Khem Raj <[email protected]>Cc Alexander Kanavin <[email protected]>Cc Martin Jansa <[email protected]>---
v2: Mark depends conditional instead
v3: Export_PYTHON_SYSCONFIGDATA_NAMEonly for target
and mark tasks with target overridemeta/classes/python3targetconfig.bbclass | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)meta/classes/python3targetconfig.bbclass +3
-1@@ -1,15 +1,17 @@ inherit python3native -DEPENDS_append = " python3" +EXTRA_PYTHON_DEPENDS ?= "" +EXTRA_PYTHON_DEPENDS_class-target = "python3" +DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}"(quoted diff) +2
-2-EXTRA_PYTHON_DEPENDS_class-target = "python3" -DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}" +EXTRA_PYTHON_DEPENDS_class-target = " python3" +DEPENDS_append = "${EXTRA_PYTHON_DEPENDS}"add a space before python3 is better than always add it to DEPENDS
Quoted 16 lines
meta/classes/python3targetconfig.bbclass +3
-4-do_configure_prepend() { +do_configure_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } -do_compile_prepend() { +do_compile_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } -do_install_prepend() { +do_install_prepend_class-target() { export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" } --Quoted 4 lines
2.29.2
--
best regards,
José QuaresmaQuoted 3 lines
Quoted 3 lines
--
best regards,
José Quaresma--
best regards,
José Quaresma