]> code.ossystems Code Review - openembedded-core.git/commitdiff
toolchain-scripts-base: add base class for toolchain_create_sdk_version
authorJoshua Lock <joshua.g.lock@intel.com>
Thu, 22 Sep 2016 13:05:50 +0000 (14:05 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 23 Sep 2016 13:53:55 +0000 (14:53 +0100)
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.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/toolchain-scripts-base.bbclass [new file with mode: 0644]
meta/classes/toolchain-scripts.bbclass

diff --git a/meta/classes/toolchain-scripts-base.bbclass b/meta/classes/toolchain-scripts-base.bbclass
new file mode 100644 (file)
index 0000000..2489b9d
--- /dev/null
@@ -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"
index 997ff8865fecfb4a3c7cb6552510bfc0fb72986a..0e11f2d7a09e631c4813154d7ed3f35d14a4e648 100644 (file)
@@ -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 = ""