Issues:
unpack and fetch can only be used if you inherit dpkg, they should be
available to others i.e. classes and images
Change:
Pull the code out of the dpdk-class and stick it into the base-class. It is the
same code, no changes to it.
Impact:
This patch does not change the behaviour of Isar. It addresses the
issue, preparing for future patches.
meta/classes/base.bbclass | 37 +++++++++++++++++++++++++++++++++++++
meta/classes/dpkg.bbclass | 37 -------------------------------------
2 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 2179ba9..7d44f72 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -58,6 +58,43 @@ python do_listtasks() {
sys.__stdout__.write("%s\n" % e)
}
+do_fetch[dirs] = "${DL_DIR}"
+
+# Fetch package from the source link
+python do_fetch() {
+ src_uri = (d.getVar('SRC_URI', True) or "").split()
+ if len(src_uri) == 0:
+ return
+
+ try:
+ fetcher = bb.fetch2.Fetch(src_uri, d)
+ fetcher.download()
+ except bb.fetch2.BBFetchException as e:
+ raise bb.build.FuncFailed(e)
+}
+
+addtask fetch before do_build
+
+do_unpack[dirs] = "${WORKDIR}"
+do_unpack[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
+
+# Unpack package and put it into working directory
+python do_unpack() {
+ src_uri = (d.getVar('SRC_URI', True) or "").split()
+ if len(src_uri) == 0:
+ return
+
+ rootdir = d.getVar('WORKDIR', True)
+
+ try:
+ fetcher = bb.fetch2.Fetch(src_uri, d)
+ fetcher.unpack(rootdir)
+ except bb.fetch2.BBFetchException as e:
+ raise bb.build.FuncFailed(e)
+}
+
+addtask unpack after do_fetch before do_build
+
addtask build
do_build[dirs] = "${TOPDIR}"
python base_do_build () {
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index c0c4499..504fd1b 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -9,43 +9,6 @@ do_build[deptask] = "do_build"
# recipe name as identifier
PP = "/home/builder/${PN}"
-do_fetch[dirs] = "${DL_DIR}"
-
-# Fetch package from the source link
-python do_fetch() {
- src_uri = (d.getVar('SRC_URI', True) or "").split()
- if len(src_uri) == 0:
- return
-
- try:
- fetcher = bb.fetch2.Fetch(src_uri, d)
- fetcher.download()
- except bb.fetch2.BBFetchException as e:
- raise bb.build.FuncFailed(e)
-}
-
-addtask fetch before do_build
-
-do_unpack[dirs] = "${WORKDIR}"
-do_unpack[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
-
-# Unpack package and put it into working directory
-python do_unpack() {
- src_uri = (d.getVar('SRC_URI', True) or "").split()
- if len(src_uri) == 0:
- return
-
- rootdir = d.getVar('WORKDIR', True)
-
- try:
- fetcher = bb.fetch2.Fetch(src_uri, d)
- fetcher.unpack(rootdir)
- except bb.fetch2.BBFetchException as e:
- raise bb.build.FuncFailed(e)
-}
-
-addtask unpack after do_fetch before do_build
-
BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
do_build[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
--
2.13.5