packagegroup/allarch: Convert to use allarch class
PATCH 1/1 packagegroup/allarch: Convert to use allarch class
Currently there is some odd behaviour of the packagegroup class in relation to sstate since it sets PACKAGE_ARCH = "all" but does not use the allarch class leading to it being undetected by sstate.
Previously it was not possible to use allarch as the recipe couldn't "undo" settings made by the allarch class. Since this no longer happens when PACKAGE_ARCH != all, we can use the allarch class.
This patch also fixes up one case we need to preserve TRANSLATED_TARGET_ARCH and ensures sstate only assumes allarch when PACKAGE_ARCH is "all".
---
meta/classes/packagegroup.bbclass +1 -1
@@ -13,7 +13,7 @@ PACKAGES = "${PN}" # By default, packagegroup packages do not depend on a certain architecture. # Only if dependencies are modified by MACHINE_FEATURES, packages # need to be set to MACHINE_ARCH after inheriting packagegroup.bbclass -PACKAGE_ARCH = "all" +inherit allarch # This automatically adds -dbg and -dev flavours of all PACKAGES # to the list. Their dependencies (RRECOMMENDS) are handled as usual
meta/classes/sstate.bbclass +1 -1
@@ -46,7 +46,7 @@ python () { d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}")) elif bb.data.inherits_class('cross-canadian', d): d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}_${PACKAGE_ARCH}")) - elif bb.data.inherits_class('allarch', d): + elif bb.data.inherits_class('allarch', d) and d.getVar("PACKAGE_ARCH", True) == "all": d.setVar('SSTATE_PKGARCH', "allarch") else: d.setVar('SSTATE_MANMACH', d.expand("${PACKAGE_ARCH}"))
meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb +3 -0
@@ -3,6 +3,9 @@ PN = "packagegroup-cross-canadian-${TRANSLATED_TARGET_ARCH}" PR = "r0" LICENSE = "MIT" +# Save TRANSLATED_TARGET_ARCH before allarch tramples it +TRANSLATED_TARGET_ARCH := "${TRANSLATED_TARGET_ARCH}" + inherit cross-canadian packagegroup PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1"
Quoted 7 lines · Richard Purdie
Currently there is some odd behaviour of the packagegroup class in relation to sstate since it sets
PACKAGE_ARCH= "all" but does not use the allarch class leading to it being undetected by sstate.Previously it was not possible to use allarch as the recipe couldn't "undo" settings made by the allarch class. Since this no longer happens when
PACKAGE_ARCH!= all, we can use the allarch class.
Now I see the usecase! :)
Quoted 2 lines
This patch also fixes up one case we need to preserve
TRANSLATED_TARGET_ARCHand ensures sstate only assumes allarch whenPACKAGE_ARCHis "all".
This seems better to be split onto another patch.
Quoted 49 lines
Signed-off-by Richard Purdie <[email protected]>---
meta/classes/packagegroup.bbclass +1
-1@@ -13,7 +13,7 @@ PACKAGES = "${PN}" # By default, packagegroup packages do not depend on a certain architecture. # Only if dependencies are modified by MACHINE_FEATURES, packages # need to be set to MACHINE_ARCH after inheriting packagegroup.bbclass -PACKAGE_ARCH = "all" +inherit allarch # This automatically adds -dbg and -dev flavours of all PACKAGES # to the list. Their dependencies (RRECOMMENDS) are handled as usualmeta/classes/sstate.bbclass +1
-1@@ -46,7 +46,7 @@ python () { d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}")) elif bb.data.inherits_class('cross-canadian', d): d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}_${PACKAGE_ARCH}")) - elif bb.data.inherits_class('allarch', d): + elif bb.data.inherits_class('allarch', d) and d.getVar("PACKAGE_ARCH", True) == "all": d.setVar('SSTATE_PKGARCH', "allarch") else: d.setVar('SSTATE_MANMACH', d.expand("${PACKAGE_ARCH}"))meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb +3
-0@@ -3,6 +3,9 @@ PN = "packagegroup-cross-canadian-${TRANSLATED_TARGET_ARCH}" PR = "r0" LICENSE = "MIT" +# Save TRANSLATED_TARGET_ARCH before allarch tramples it +TRANSLATED_TARGET_ARCH := "${TRANSLATED_TARGET_ARCH}" + inherit cross-canadian packagegroup PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1"_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 3 lines
Otavio Salvador O.S. Systems E-mail: [email protected] http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br