Do not use our own copy of that class and move local deviations into
isar-base. That also fixes the default tasks "showdata" and "listtasks",
which probably never worked.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
meta/classes/base.bbclass | 81 +-----------------------------------------
meta/classes/dpkg.bbclass | 2 ++
meta/classes/ext4-img.bbclass | 2 ++
meta/classes/isar-base.bbclass | 36 +++++++++++++++++++
4 files changed, 41 insertions(+), 80 deletions(-)
mode change 100644 => 120000 meta/classes/base.bbclass
create mode 100644 meta/classes/isar-base.bbclass
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
deleted file mode 100644
index 48b6bac..0000000
--- a/meta/classes/base.bbclass
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright (C) 2003 Chris Larson
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-
-THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}"
-
-die() {
- bbfatal "$*"
-}
-
-bbnote() {
- echo "NOTE:" "$*"
-}
-
-bbwarn() {
- echo "WARNING:" "$*"
-}
-
-bbfatal() {
- echo "FATAL:" "$*"
- exit 1
-}
-
-bbdebug() {
- test $# -ge 2 || {
- echo "Usage: bbdebug level \"message\""
- exit 1
- }
-
- test ${@bb.msg.debug_level['default']} -ge $1 && {
- shift
- echo "DEBUG:" $*
- }
-}
-
-addtask showdata
-do_showdata[nostamp] = "1"
-python do_showdata() {
- import sys
- # emit variables and shell functions
- bb.data.emit_env(sys.__stdout__, d, True)
- # emit the metadata which isnt valid shell
- for e in bb.data.keys(d):
- if bb.data.getVarFlag(e, 'python', d):
- sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, bb.data.getVar(e, d, 1)))
-}
-
-addtask listtasks
-do_listtasks[nostamp] = "1"
-python do_listtasks() {
- import sys
- for e in bb.data.keys(d):
- if bb.data.getVarFlag(e, 'task', d):
- sys.__stdout__.write("%s\n" % e)
-}
-
-addtask build
-do_build[dirs] = "${TOPDIR}"
-python base_do_build () {
- bb.note("The included, default BB base.bbclass does not define a useful default task.")
- bb.note("Try running the 'listtasks' task against a .bb to see what tasks are defined.")
-}
-
-EXPORT_FUNCTIONS do_clean do_mrproper do_build
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
new file mode 120000
index 0000000..11fe0a4
--- /dev/null
+++ b/meta/classes/base.bbclass
@@ -0,0 +1 @@
+../../bitbake/classes/base.bbclass
\ No newline at end of file
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index a0446d7..3d7aafb 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -1,6 +1,8 @@
# This software is a part of ISAR.
# Copyright (C) 2015-2016 ilbers GmbH
+inherit isar-base
+
# Add dependency from buildchroot creation
DEPENDS += "buildchroot"
do_unpack[deptask] = "do_build"
diff --git a/meta/classes/ext4-img.bbclass b/meta/classes/ext4-img.bbclas s
index 65d4c11..1486c3e 100644
--- a/meta/classes/ext4-img.bbclass
+++ b/meta/classes/ext4-img.bbclass
@@ -1,6 +1,8 @@
# This software is a part of ISAR.
# Copyright (C) 2015-2016 ilbers GmbH
+inherit isar-base
+
# Extra space for rootfs in MB
ROOTFS_EXTRA ?= "64"
diff --git a/meta/classes/isar-base.bbclass b/meta/classes/isar-base.bbcla ss
new file mode 100644
index 0000000..67d38a1
--- /dev/null
+++ b/meta/classes/isar-base.bbclass
@@ -0,0 +1,36 @@
+# This software is a part of ISAR.
+# Copyright (C) 2017 Siemens AG
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+
+THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}"
+
+bbdebug() {
+ test $# -ge 2 || {
+ echo "Usage: bbdebug level \"message\""
+ exit 1
+ }
+
+ test ${@bb.msg.debug_level['default']} -ge $1 && {
+ shift
+ echo "DEBUG:" $*
+ }
+}
+
+do_build[nostamp] = "0"
--
2.13.0