blob: 5bcfd0b72cd815fbb9a8b79f1b1de060699be1cf [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():
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05007 if d.getVarFlag(e, 'task', True):
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008 maxlen = max(maxlen, len(e))
9 if e.endswith('_setscene'):
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050010 desc = "%s (setscene version)" % (d.getVarFlag(e[:-9], 'doc', True) or '')
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011 else:
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050012 desc = d.getVarFlag(e, 'doc', True) 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
31 dir = "%s.*" % bb.data.expand(d.getVar('STAMP', False), d)
32 bb.note("Removing " + dir)
33 oe.path.remove(dir)
34
35 for f in (d.getVar('CLEANFUNCS', True) or '').split():
36 bb.build.exec_func(f, d)
37}
38
39addtask checkuri
40do_checkuri[nostamp] = "1"
41python do_checkuri() {
42 src_uri = (d.getVar('SRC_URI', True) or "").split()
43 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()
49 except bb.fetch2.BBFetchException, e:
50 raise bb.build.FuncFailed(e)
51}
52
53addtask checkuriall after do_checkuri
54do_checkuriall[recrdeptask] = "do_checkuriall do_checkuri"
55do_checkuriall[recideptask] = "do_${BB_DEFAULT_TASK}"
56do_checkuriall[nostamp] = "1"
57do_checkuriall() {
58 :
59}
60
61addtask fetchall after do_fetch
62do_fetchall[recrdeptask] = "do_fetchall do_fetch"
63do_fetchall[recideptask] = "do_${BB_DEFAULT_TASK}"
64do_fetchall() {
65 :
66}