blob: 0466325c1313f9775c945258d7f5949c54254fcf [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
Patrick Williams213cb262021-08-07 19:21:33 -050022T:task-clean = "${LOG_DIR}/cleanlogs/${PN}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023addtask 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"
Andrew Geissler595f6302022-01-24 19:11:47 +000041do_checkuri[network] = "1"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050042python do_checkuri() {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050043 src_uri = (d.getVar('SRC_URI') or "").split()
Patrick Williamsc124f4f2015-09-15 14:41:29 -050044 if len(src_uri) == 0:
45 return
46
Patrick Williamsc124f4f2015-09-15 14:41:29 -050047 try:
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050048 fetcher = bb.fetch2.Fetch(src_uri, d)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050049 fetcher.checkstatus()
Patrick Williamsc0f7c042017-02-23 20:41:17 -060050 except bb.fetch2.BBFetchException as e:
51 bb.fatal(str(e))
Patrick Williamsc124f4f2015-09-15 14:41:29 -050052}
53
Patrick Williamsc124f4f2015-09-15 14:41:29 -050054