2 do_listtasks[nostamp] = "1"
3 python do_listtasks() {
5 # emit variables and shell functions
6 #bb.data.emit_env(sys.__stdout__, d)
7 # emit the metadata which isnt valid shell
9 if bb.data.getVarFlag(e, 'task', d):
10 sys.__stdout__.write("%s\n" % e)
14 do_clean[dirs] = "${TOPDIR}"
15 do_clean[nostamp] = "1"
17 """clear the build and temp directories"""
18 dir = bb.data.expand("${WORKDIR}", d)
19 if dir == '//': raise bb.build.FuncFailed("wrong DATADIR")
20 bb.note("removing " + base_path_out(dir, d))
21 os.system('rm -rf ' + dir)
23 dir = "%s.*" % bb.data.expand(bb.data.getVar('STAMP', d), d)
24 bb.note("removing " + base_path_out(dir, d))
25 os.system('rm -f '+ dir)
28 python do_cleanall() {
31 do_cleanall[recrdeptask] = "do_clean"
32 addtask cleanall after do_clean
34 addtask rebuild after do_${BB_DEFAULT_TASK}
35 do_rebuild[dirs] = "${TOPDIR}"
36 do_rebuild[nostamp] = "1"
38 """rebuild a package"""
42 do_distclean[dirs] = "${TOPDIR}"
43 do_distclean[nostamp] = "1"
44 python do_distclean() {
45 """clear downloaded sources, build and temp directories"""
47 bb.build.exec_func('do_clean', d)
49 src_uri = bb.data.getVar('SRC_URI', d, 1)
53 for uri in src_uri.split():
54 if bb.decodeurl(uri)[0] == "file":
58 local = bb.data.expand(bb.fetch.localpath(uri, d), d)
59 except bb.MalformedUrl, e:
60 bb.debug(1, 'Unable to generate local path for malformed uri: %s' % e)
62 bb.note("removing %s" % base_path_out(local, d))
64 if os.path.exists(local + ".md5"):
65 os.remove(local + ".md5")
66 if os.path.exists(local):
69 bb.note("Error in removal: %s" % e)
73 do_checkuri[nostamp] = "1"
74 python do_checkuri() {
77 localdata = bb.data.createCopy(d)
78 bb.data.update_data(localdata)
80 src_uri = bb.data.getVar('SRC_URI', localdata, 1)
83 bb.fetch.init(src_uri.split(),d)
84 except bb.fetch.NoMethodError:
85 (type, value, traceback) = sys.exc_info()
86 raise bb.build.FuncFailed("No method: %s" % value)
89 bb.fetch.checkstatus(localdata)
90 except bb.fetch.MissingParameterError:
91 (type, value, traceback) = sys.exc_info()
92 raise bb.build.FuncFailed("Missing parameters: %s" % value)
93 except bb.fetch.FetchError:
94 (type, value, traceback) = sys.exc_info()
95 raise bb.build.FuncFailed("Fetch failed: %s" % value)
96 except bb.fetch.MD5SumError:
97 (type, value, traceback) = sys.exc_info()
98 raise bb.build.FuncFailed("MD5 failed: %s" % value)
100 (type, value, traceback) = sys.exc_info()
101 raise bb.build.FuncFailed("Unknown fetch Error: %s" % value)
104 addtask checkuriall after do_checkuri
105 do_checkuriall[recrdeptask] = "do_checkuri"
106 do_checkuriall[nostamp] = "1"
111 addtask fetchall after do_fetch
112 do_fetchall[recrdeptask] = "do_fetch"
117 addtask buildall after do_build
118 do_buildall[recrdeptask] = "do_build"