packagegroup-cross-canadian: repackage when multilibs gcc gdb binutils changes
PATCH v2 1/1 packagegroup-cross-canadian: repackage when multilibs gcc gdb binutils changes
1. Build SDK without "MULTILIBS = """ in local.conf.
2. Build SDK again with "MULTILIBS = """ in local.conf, build will fail with the error info.
Error:
Problem: conflicting requests
- nothing provides binutils-cross-canadian-arm needed by packagegroup-cross-canadian-nxp-ls1028-1.0-r0.x86_64_nativesdk
- ......
--- .../packagegroups/packagegroup-cross-canadian.bb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb +10 -5
@@ -17,8 +17,13 @@ RDEPENDS_${PN} = "\ meta-environment-${MACHINE} \ " -# When TUNE_ARCH changes but MACHINE does not (for example when a machine definition is updated), -# cross-canadian.bbclass prevents variable dependency propagation to TRANSLATED_TARGET_ARCH -# This will result in erroneous reuse of previous sstate packages. The following line -# establishes a direct dependency instead. -do_package[vardeps] += "TUNE_ARCH" +# When TUNE_ARCH, GCC, GDB, BINUTILS changes but MACHINE does not (for example when a machine +# definition is updated), cross-canadian.bbclass prevents variable dependency propagation to +# TRANSLATED_TARGET_ARCH This will result in erroneous reuse of previous sstate packages. The +# following line establishes a direct dependency instead. +do_package[vardeps] += "\ + ${@all_multilib_tune_values(d, 'BINUTILS')} \ + ${@all_multilib_tune_values(d, 'GDB')} \ + ${@all_multilib_tune_values(d, 'GCC')} \ + TUNE_ARCH \ + "
Signature · 1 line
2.23.0
ping
Quoted 39 lines · Jiping Ma
1. Build SDK without "MULTILIBS = """ in local.conf.
2. Build SDK again with "MULTILIBS = """ in local.conf, build will fail with the error info.
Error:
Problem: conflicting requests
- nothing provides binutils-cross-canadian-arm needed by packagegroup-cross-canadian-nxp-ls1028-1.0-r0.x86_64_nativesdk
- ......Signed-off-by Jiping Ma <[email protected]>--- .../packagegroups/packagegroup-cross-canadian.bb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb +10
-5@@ -17,8 +17,13 @@ RDEPENDS_${PN} = "\ meta-environment-${MACHINE} \ " -# When TUNE_ARCH changes but MACHINE does not (for example when a machine definition is updated), -# cross-canadian.bbclass prevents variable dependency propagation to TRANSLATED_TARGET_ARCH -# This will result in erroneous reuse of previous sstate packages. The following line -# establishes a direct dependency instead. -do_package[vardeps] += "TUNE_ARCH" +# When TUNE_ARCH, GCC, GDB, BINUTILS changes but MACHINE does not (for example when a machine +# definition is updated), cross-canadian.bbclass prevents variable dependency propagation to +# TRANSLATED_TARGET_ARCH This will result in erroneous reuse of previous sstate packages. The +# following line establishes a direct dependency instead. +do_package[vardeps] += "\ + ${@all_multilib_tune_values(d, 'BINUTILS')} \ + ${@all_multilib_tune_values(d, 'GDB')} \ + ${@all_multilib_tune_values(d, 'GCC')} \ + TUNE_ARCH \ + "
Quoted 1 line · Chen Qi
ping
Ping v2.
Is there a problem with this solution or
do you think we shouldn't handle the use case for some reason?
../Randy
Quoted 44 lines · Jiping Ma
Quoted 37 lines
1. Build SDK without "MULTILIBS = """ in local.conf.
2. Build SDK again with "MULTILIBS = """ in local.conf, build will fail with the error info.
Error:
Problem: conflicting requests
- nothing provides binutils-cross-canadian-arm needed by packagegroup-cross-canadian-nxp-ls1028-1.0-r0.x86_64_nativesdk
- ......Signed-off-by Jiping Ma<[email protected]>--- .../packagegroups/packagegroup-cross-canadian.bb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb +10
-5@@ -17,8 +17,13 @@ RDEPENDS_${PN} = "\ meta-environment-${MACHINE} \ " -# When TUNE_ARCH changes but MACHINE does not (for example when a machine definition is updated), -# cross-canadian.bbclass prevents variable dependency propagation to TRANSLATED_TARGET_ARCH -# This will result in erroneous reuse of previous sstate packages. The following line -# establishes a direct dependency instead. -do_package[vardeps] += "TUNE_ARCH" +# When TUNE_ARCH, GCC, GDB, BINUTILS changes but MACHINE does not (for example when a machine +# definition is updated), cross-canadian.bbclass prevents variable dependency propagation to +# TRANSLATED_TARGET_ARCH This will result in erroneous reuse of previous sstate packages. The +# following line establishes a direct dependency instead. +do_package[vardeps] += "\ + ${@all_multilib_tune_values(d, 'BINUTILS')} \ + ${@all_multilib_tune_values(d, 'GDB')} \ + ${@all_multilib_tune_values(d, 'GCC')} \ + TUNE_ARCH \ + "
Signature · 2 lines
# Randy MacLeod # Wind River Linux
Quoted 44 lines · Randy MacLeod
Quoted 1 line · Chen Qi
ping
Ping v2.
Is there a problem with this solution or
do you think we shouldn't handle the use case for some reason?../Randy
Quoted 35 lines · Jiping Ma
Quoted 33 lines
1. Build SDK without "MULTILIBS = """ in local.conf.
2. Build SDK again with "MULTILIBS = """ in local.conf, build will fail with the error info.
Error:
Problem: conflicting requests
- nothing provides binutils-cross-canadian-arm needed by packagegroup-cross-canadian-nxp-ls1028-1.0-r0.x86_64_nativesdk
- ......(quoted diff) +0
-0canadian.bb b/meta/recipes-core/packagegroups/packagegroup-cross- canadian.bb
index3b430c0814..b6b3e5235f100644
--- a/meta/recipes-core/packagegroups/packagegroup-cross- canadian.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-cross- canadian.bbmeta/recipes-core/packagegroups/packagegroup-cross-canadian.bb +0
-0@@ -17,8 +17,13 @@ RDEPENDS_${PN} = "\ meta-environment-${MACHINE} \"
-# WhenTUNE_ARCHchanges but MACHINE does not (for example when a machine definition is updated),
-# cross-canadian.bbclass prevents variable dependency propagation toTRANSLATED_TARGET_ARCH
-# This will result in erroneous reuse of previous sstate packages. The following linemeta/recipes-core/packagegroups/packagegroup-cross-canadian.bb +1
-2-# establishes a direct dependency instead. -do_package[vardeps] += "TUNE_ARCH" +# When TUNE_ARCH, GCC, GDB, BINUTILS changes but MACHINE doesnot (for example when a machine
+# definition is updated), cross-canadian.bbclass prevents variable dependency propagation to
+#TRANSLATED_TARGET_ARCHThis will result in erroneous reuse of
Quoted 8 lines
Quoted 8 lines
meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb RDEPENDS_${PN} = "\ · line 29
Quoted 8 lines
previous sstate packages. The
meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb +7
-0+# following line establishes a direct dependency instead. +do_package[vardeps] += "\ + ${@all_multilib_tune_values(d, 'BINUTILS')} \ + ${@all_multilib_tune_values(d, 'GDB')} \ + ${@all_multilib_tune_values(d, 'GCC')} \ + TUNE_ARCH \ + "
I keep putting off reviewing this as its wrong in several different ways and its hard to explain. In particular:
a) vardeps takes names of variables yet all_multilib_tune_values() returns values, not variable names. This alone makes it incorrect.
b) BINUTILS, GCC and GDB are artificial constructs which change with TRANSLATED_TARGET_ARCH only so listing three values here is suboptimal, we just need to worry about TRANSLATED_TARGET_ARCH.
So really you want a way to say "depend on all the multilib versions of TUNE_ARCH" but there is no way to express such a thing as a list of variables.
You could put ${@all_multilib_tune_values(d, 'TRANSLATED_TARGET_ARCH')} replacing TUNE_ARCH and it would probably work just as well as the above but is also technically incorrect due to a).
I don't know how to fix this properly, except perhaps constructing an artifical variable which does contain the expanded values of TRANSLATED_TARGET_ARCH as vardepvalues?
Cheers,
Richard