Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | addtask listtasks |
| 2 | do_listtasks[nostamp] = "1" |
| 3 | python do_listtasks() { |
| 4 | taskdescs = {} |
| 5 | maxlen = 0 |
| 6 | for e in d.keys(): |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 7 | if d.getVarFlag(e, 'task'): |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 8 | maxlen = max(maxlen, len(e)) |
| 9 | if e.endswith('_setscene'): |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 10 | desc = "%s (setscene version)" % (d.getVarFlag(e[:-9], 'doc') or '') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 11 | else: |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 12 | desc = d.getVarFlag(e, 'doc') or '' |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 13 | 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 | |
| 20 | CLEANFUNCS ?= "" |
| 21 | |
| 22 | T_task-clean = "${LOG_DIR}/cleanlogs/${PN}" |
| 23 | addtask clean |
| 24 | do_clean[nostamp] = "1" |
| 25 | python 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 31 | dir = "%s.*" % d.getVar('STAMP') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 32 | bb.note("Removing " + dir) |
| 33 | oe.path.remove(dir) |
| 34 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 35 | for f in (d.getVar('CLEANFUNCS') or '').split(): |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 36 | bb.build.exec_func(f, d) |
| 37 | } |
| 38 | |
| 39 | addtask checkuri |
| 40 | do_checkuri[nostamp] = "1" |
| 41 | python do_checkuri() { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 42 | src_uri = (d.getVar('SRC_URI') or "").split() |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 43 | if len(src_uri) == 0: |
| 44 | return |
| 45 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 46 | try: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 47 | fetcher = bb.fetch2.Fetch(src_uri, d) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 48 | fetcher.checkstatus() |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 49 | except bb.fetch2.BBFetchException as e: |
| 50 | bb.fatal(str(e)) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 51 | } |
| 52 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 53 | |