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
35 do_distclean[dirs] = "${TOPDIR}"
36 do_distclean[nostamp] = "1"
37 python do_distclean() {
38 """clear downloaded sources, build and temp directories"""
40 bb.build.exec_func('do_clean', d)
42 src_uri = bb.data.getVar('SRC_URI', d, 1)
46 for uri in src_uri.split():
47 if bb.decodeurl(uri)[0] == "file":
51 local = bb.data.expand(bb.fetch.localpath(uri, d), d)
52 except bb.MalformedUrl, e:
53 bb.debug(1, 'Unable to generate local path for malformed uri: %s' % e)
55 bb.note("removing %s" % base_path_out(local, d))
57 if os.path.exists(local + ".md5"):
58 os.remove(local + ".md5")
59 if os.path.exists(local):
62 bb.note("Error in removal: %s" % e)
66 do_checkuri[nostamp] = "1"
67 python do_checkuri() {
70 localdata = bb.data.createCopy(d)
71 bb.data.update_data(localdata)
73 src_uri = bb.data.getVar('SRC_URI', localdata, 1)
76 bb.fetch.init(src_uri.split(),d)
77 except bb.fetch.NoMethodError:
78 (type, value, traceback) = sys.exc_info()
79 raise bb.build.FuncFailed("No method: %s" % value)
82 bb.fetch.checkstatus(localdata)
83 except bb.fetch.MissingParameterError:
84 (type, value, traceback) = sys.exc_info()
85 raise bb.build.FuncFailed("Missing parameters: %s" % value)
86 except bb.fetch.FetchError:
87 (type, value, traceback) = sys.exc_info()
88 raise bb.build.FuncFailed("Fetch failed: %s" % value)
89 except bb.fetch.MD5SumError:
90 (type, value, traceback) = sys.exc_info()
91 raise bb.build.FuncFailed("MD5 failed: %s" % value)
93 (type, value, traceback) = sys.exc_info()
94 raise bb.build.FuncFailed("Unknown fetch Error: %s" % value)
97 addtask checkuriall after do_checkuri
98 do_checkuriall[recrdeptask] = "do_checkuri"
99 do_checkuriall[nostamp] = "1"
104 addtask fetchall after do_fetch
105 do_fetchall[recrdeptask] = "do_fetch"
110 addtask buildall after do_build
111 do_buildall[recrdeptask] = "do_build"