diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 14:31:25 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 16:43:26 +0000 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/classes/utility-tasks.bbclass | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.gz blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.zip |
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to
hold all of the layers that we import with git-subtree.
Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/meta/classes/utility-tasks.bbclass')
-rw-r--r-- | import-layers/yocto-poky/meta/classes/utility-tasks.bbclass | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/classes/utility-tasks.bbclass b/import-layers/yocto-poky/meta/classes/utility-tasks.bbclass new file mode 100644 index 000000000..5bcfd0b72 --- /dev/null +++ b/import-layers/yocto-poky/meta/classes/utility-tasks.bbclass @@ -0,0 +1,66 @@ +addtask listtasks +do_listtasks[nostamp] = "1" +python do_listtasks() { + taskdescs = {} + maxlen = 0 + for e in d.keys(): + if d.getVarFlag(e, 'task', True): + maxlen = max(maxlen, len(e)) + if e.endswith('_setscene'): + desc = "%s (setscene version)" % (d.getVarFlag(e[:-9], 'doc', True) or '') + else: + desc = d.getVarFlag(e, 'doc', True) or '' + taskdescs[e] = desc + + tasks = sorted(taskdescs.keys()) + for taskname in tasks: + bb.plain("%s %s" % (taskname.ljust(maxlen), taskdescs[taskname])) +} + +CLEANFUNCS ?= "" + +T_task-clean = "${LOG_DIR}/cleanlogs/${PN}" +addtask clean +do_clean[nostamp] = "1" +python do_clean() { + """clear the build and temp directories""" + dir = d.expand("${WORKDIR}") + bb.note("Removing " + dir) + oe.path.remove(dir) + + dir = "%s.*" % bb.data.expand(d.getVar('STAMP', False), d) + bb.note("Removing " + dir) + oe.path.remove(dir) + + for f in (d.getVar('CLEANFUNCS', True) or '').split(): + bb.build.exec_func(f, d) +} + +addtask checkuri +do_checkuri[nostamp] = "1" +python do_checkuri() { + src_uri = (d.getVar('SRC_URI', True) or "").split() + if len(src_uri) == 0: + return + + try: + fetcher = bb.fetch2.Fetch(src_uri, d) + fetcher.checkstatus() + except bb.fetch2.BBFetchException, e: + raise bb.build.FuncFailed(e) +} + +addtask checkuriall after do_checkuri +do_checkuriall[recrdeptask] = "do_checkuriall do_checkuri" +do_checkuriall[recideptask] = "do_${BB_DEFAULT_TASK}" +do_checkuriall[nostamp] = "1" +do_checkuriall() { + : +} + +addtask fetchall after do_fetch +do_fetchall[recrdeptask] = "do_fetchall do_fetch" +do_fetchall[recideptask] = "do_${BB_DEFAULT_TASK}" +do_fetchall() { + : +} |