aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-09-22 13:00:34 +0100
committerJoshua Lock <joshua.g.lock@intel.com>2016-09-22 14:01:19 +0100
commit62a95d4a4031596bd155f96f8bbbaa5d449ddd04 (patch)
tree307f733da3f2d1af852dc2324e0e467e3b5f03c4
parent7e0f95bf359bc3b5bb1578024a993e184de155cd (diff)
downloadopenembedded-core-contrib-62a95d4a4031596bd155f96f8bbbaa5d449ddd04.tar.gz
openembedded-core-contrib-62a95d4a4031596bd155f96f8bbbaa5d449ddd04.tar.bz2
openembedded-core-contrib-62a95d4a4031596bd155f96f8bbbaa5d449ddd04.zip
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. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
-rw-r--r--meta/classes/toolchain-scripts-base.bbclass11
-rw-r--r--meta/classes/toolchain-scripts.bbclass14
2 files changed, 12 insertions, 13 deletions
diff --git a/meta/classes/toolchain-scripts-base.bbclass b/meta/classes/toolchain-scripts-base.bbclass
new file mode 100644
index 00000000000..2489b9dbeb8
--- /dev/null
+++ b/meta/classes/toolchain-scripts-base.bbclass
@@ -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"
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 997ff8865fe..0e11f2d7a09 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -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 = ""