Skip to contentSkip to conversation

toolchain-scripts-base: add base class for toolchain_create_sdk_version

PATCH New Joshua Lock 1 participant 2 messages Sep 22, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 toolchain-scripts-base: add base class for toolchain_create_sdk_version

We use toolchain_create_sdk_version() in buildtools-tarball but don't want the extra classes toolchain-scripts pulls in, therefore split out a separate base class for this function which both toolchain-scripts and the buildtools-tarball can inherit.

---
 meta/classes/toolchain-scripts-base.bbclass | 11 +++++++++++
 meta/classes/toolchain-scripts.bbclass      | 14 +-------------
 2 files changed, 12 insertions(+), 13 deletions(-)
 create mode 100644 meta/classes/toolchain-scripts-base.bbclass
meta/classes/toolchain-scripts-base.bbclass new file +11 -0
new file mode 100644
index 0000000..2489b9d
@@ -0,0 +1,11 @@
+#This function create a version information file
+toolchain_create_sdk_version () {
+	local versionfile=$1
+	rm -f $versionfile
+	touch $versionfile
+	echo 'Distro: ${DISTRO}' >> $versionfile
+	echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile
+	echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
+	echo 'Timestamp: ${DATETIME}' >> $versionfile
+}
+toolchain_create_sdk_version[vardepsexclude] = "DATETIME"
meta/classes/toolchain-scripts.bbclass +1 -13
index 997ff88..0e11f2d 100644
@@ -1,4 +1,4 @@
-inherit siteinfo kernel-arch
+inherit toolchain-scripts-base siteinfo kernel-arch
 
 # We want to be able to change the value of MULTIMACH_TARGET_SYS, because it
 # doesn't always match our expectations... but we default to the stock value
@@ -136,18 +136,6 @@ toolchain_create_sdk_siteconfig () {
 # The immediate expansion above can result in unwanted path dependencies here
 toolchain_create_sdk_siteconfig[vardepsexclude] = "TOOLCHAIN_CONFIGSITE_SYSROOTCACHE"
 
-#This function create a version information file
-toolchain_create_sdk_version () {
-	local versionfile=$1
-	rm -f $versionfile
-	touch $versionfile
-	echo 'Distro: ${DISTRO}' >> $versionfile
-	echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile
-	echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
-	echo 'Timestamp: ${DATETIME}' >> $versionfile
-}
-toolchain_create_sdk_version[vardepsexclude] = "DATETIME"
-
 python __anonymous () {
     import oe.classextend
     deps = ""
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 buildtools-tarball: improve stamp independence

buildtools-tarball shouldn't be regenerated when MACHINE changes, nor should variants for other SDKMACHINE be removed from the deploy directory when SDKMACHINE changes.

Remove target architecture dependencies so that deploy artefacts can overlap.

---
 meta/recipes-core/meta/buildtools-tarball.bb | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
meta/recipes-core/meta/buildtools-tarball.bb +13 -2
index 2e738e6..da18c09 100644
@@ -28,10 +28,13 @@ TOOLCHAIN_HOST_TASK ?= "\
 
 MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
 PACKAGE_ARCH = "${SDK_ARCH}"
+PACKAGE_ARCHS = ""
+TARGET_ARCH = "none"
+TARGET_OS = "none"
 
 SDK_PACKAGE_ARCHS += "buildtools-dummy-${SDKPKGSUFFIX}"
 
-TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-buildtools-nativesdk-standalone-${DISTRO_VERSION}"
+TOOLCHAIN_OUTPUTNAME ?= "${SDK_ARCH}-buildtools-nativesdk-standalone-${DISTRO_VERSION}"
 
 SDK_TITLE = "Build tools"
 
@@ -41,10 +44,18 @@ EXCLUDE_FROM_WORLD = "1"
 
 inherit meta
 inherit populate_sdk
-inherit toolchain-scripts
+inherit toolchain-scripts-base
+inherit nopackages
+
+deltask install
+deltask package
+deltask packagedata
+deltask populate_sysroot
 
 do_populate_sdk[stamp-extra-info] = "${SDKMACHINE}"
 
+REAL_MULTIMACH_TARGET_SYS = "none"
+
 create_sdk_files_append () {
 	rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-*
 	rm -f ${SDK_OUTPUT}/${SDKPATH}/environment-setup-*
Signature · 1 line
2.7.4