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_mrproper[dirs] = "${TOPDIR}"
43 do_mrproper[nostamp] = "1"
44 python do_mrproper() {
45 """clear downloaded sources, build and temp directories"""
46 dir = bb.data.expand("${DL_DIR}", d)
47 if dir == '/': bb.build.FuncFailed("wrong DATADIR")
48 bb.debug(2, "removing " + dir)
49 os.system('rm -rf ' + dir)
50 bb.build.exec_func('do_clean', d)
54 do_distclean[dirs] = "${TOPDIR}"
55 do_distclean[nostamp] = "1"
56 python do_distclean() {
57 """clear downloaded sources, build and temp directories"""
59 bb.build.exec_func('do_clean', d)
61 src_uri = bb.data.getVar('SRC_URI', d, 1)
65 for uri in src_uri.split():
66 if bb.decodeurl(uri)[0] == "file":
70 local = bb.data.expand(bb.fetch.localpath(uri, d), d)
71 except bb.MalformedUrl, e:
72 bb.debug(1, 'Unable to generate local path for malformed uri: %s' % e)
74 bb.note("removing %s" % base_path_out(local, d))
76 if os.path.exists(local + ".md5"):
77 os.remove(local + ".md5")
78 if os.path.exists(local):
81 bb.note("Error in removal: %s" % e)
85 do_checkuri[nostamp] = "1"
86 python do_checkuri() {
89 localdata = bb.data.createCopy(d)
90 bb.data.update_data(localdata)
92 src_uri = bb.data.getVar('SRC_URI', localdata, 1)
95 bb.fetch.init(src_uri.split(),d)
96 except bb.fetch.NoMethodError:
97 (type, value, traceback) = sys.exc_info()
98 raise bb.build.FuncFailed("No method: %s" % value)
101 bb.fetch.checkstatus(localdata)
102 except bb.fetch.MissingParameterError:
103 (type, value, traceback) = sys.exc_info()
104 raise bb.build.FuncFailed("Missing parameters: %s" % value)
105 except bb.fetch.FetchError:
106 (type, value, traceback) = sys.exc_info()
107 raise bb.build.FuncFailed("Fetch failed: %s" % value)
108 except bb.fetch.MD5SumError:
109 (type, value, traceback) = sys.exc_info()
110 raise bb.build.FuncFailed("MD5 failed: %s" % value)
112 (type, value, traceback) = sys.exc_info()
113 raise bb.build.FuncFailed("Unknown fetch Error: %s" % value)
116 addtask checkuriall after do_checkuri
117 do_checkuriall[recrdeptask] = "do_checkuri"
118 do_checkuriall[nostamp] = "1"
123 addtask fetchall after do_fetch
124 do_fetchall[recrdeptask] = "do_fetch"
129 addtask buildall after do_build
130 do_buildall[recrdeptask] = "do_build"