blob: b1f27d3658fd120ae923a9e3a68fcef8a9f28990 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001addtask listtasks
2do_listtasks[nostamp] = "1"
3python do_listtasks() {
4 taskdescs = {}
5 maxlen = 0
6 for e in d.keys():
Brad Bishop6e60e8b2018-02-01 10:27:11 -05007 if d.getVarFlag(e, 'task'):
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008 maxlen = max(maxlen, len(e))
9 if e.endswith('_setscene'):
Brad Bishop6e60e8b2018-02-01 10:27:11 -050010 desc = "%s (setscene version)" % (d.getVarFlag(e[:-9], 'doc') or '')
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011 else:
Brad Bishop6e60e8b2018-02-01 10:27:11 -050012 desc = d.getVarFlag(e, 'doc') or ''
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013 taskdescs[e] = desc
14
15 tasks = sorted(taskdescs.keys())
16 for taskname in tasks:
17 bb.plain("%s %s" % (taskname.ljust(maxlen), taskdescs[taskname]))
18}
19
20CLEANFUNCS ?= ""
21
22T_task-clean = "${LOG_DIR}/cleanlogs/${PN}"
23addtask clean
24do_clean[nostamp] = "1"
25python do_clean() {
26 """clear the build and temp directories"""
27 dir = d.expand("${WORKDIR}")
28 bb.note("Removing " + dir)
29 oe.path.remove(dir)
30
Brad Bishop6e60e8b2018-02-01 10:27:11 -050031 dir = "%s.*" % d.getVar('STAMP')
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032 bb.note("Removing " + dir)
33 oe.path.remove(dir)
34
Brad Bishop6e60e8b2018-02-01 10:27:11 -050035 for f in (d.getVar('CLEANFUNCS') or '').split():
Patrick Williamsc124f4f2015-09-15 14:41:29 -050036 bb.build.exec_func(f, d)
37}
38
39addtask checkuri
40do_checkuri[nostamp] = "1"
41python do_checkuri() {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050042 src_uri = (d.getVar('SRC_URI') or "").split()
Patrick Williamsc124f4f2015-09-15 14:41:29 -050043 if len(src_uri) == 0:
44 return
45
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046 try:
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050047 fetcher = bb.fetch2.Fetch(src_uri, d)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050048 fetcher.checkstatus()
Patrick Williamsc0f7c042017-02-23 20:41:17 -060049 except bb.fetch2.BBFetchException as e:
50 bb.fatal(str(e))
Patrick Williamsc124f4f2015-09-15 14:41:29 -050051}
52
Patrick Williamsc124f4f2015-09-15 14:41:29 -050053