summaryrefslogtreecommitdiffstats
path: root/meta/classes/utility-tasks.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/utility-tasks.bbclass')
-rw-r--r--meta/classes/utility-tasks.bbclass56
1 files changed, 28 insertions, 28 deletions
diff --git a/meta/classes/utility-tasks.bbclass b/meta/classes/utility-tasks.bbclass
index 6c2232ec57..d150ec57ba 100644
--- a/meta/classes/utility-tasks.bbclass
+++ b/meta/classes/utility-tasks.bbclass
@@ -1,13 +1,13 @@
1addtask listtasks 1addtask listtasks
2do_listtasks[nostamp] = "1" 2do_listtasks[nostamp] = "1"
3python do_listtasks() { 3python do_listtasks() {
4 import sys 4 import sys
5 # emit variables and shell functions 5 # emit variables and shell functions
6 #bb.data.emit_env(sys.__stdout__, d) 6 #bb.data.emit_env(sys.__stdout__, d)
7 # emit the metadata which isnt valid shell 7 # emit the metadata which isnt valid shell
8 for e in d.keys(): 8 for e in d.keys():
9 if d.getVarFlag(e, 'task'): 9 if d.getVarFlag(e, 'task'):
10 bb.plain("%s" % e) 10 bb.plain("%s" % e)
11} 11}
12 12
13CLEANFUNCS ?= "" 13CLEANFUNCS ?= ""
@@ -15,34 +15,34 @@ CLEANFUNCS ?= ""
15addtask clean 15addtask clean
16do_clean[nostamp] = "1" 16do_clean[nostamp] = "1"
17python do_clean() { 17python do_clean() {
18 """clear the build and temp directories""" 18 """clear the build and temp directories"""
19 dir = d.expand("${WORKDIR}") 19 dir = d.expand("${WORKDIR}")
20 bb.note("Removing " + dir) 20 bb.note("Removing " + dir)
21 oe.path.remove(dir) 21 oe.path.remove(dir)
22 22
23 dir = "%s.*" % bb.data.expand(d.getVar('STAMP'), d) 23 dir = "%s.*" % bb.data.expand(d.getVar('STAMP'), d)
24 bb.note("Removing " + dir) 24 bb.note("Removing " + dir)
25 oe.path.remove(dir) 25 oe.path.remove(dir)
26 26
27 for f in (d.getVar('CLEANFUNCS', True) or '').split(): 27 for f in (d.getVar('CLEANFUNCS', True) or '').split():
28 bb.build.exec_func(f, d) 28 bb.build.exec_func(f, d)
29} 29}
30 30
31addtask checkuri 31addtask checkuri
32do_checkuri[nostamp] = "1" 32do_checkuri[nostamp] = "1"
33python do_checkuri() { 33python do_checkuri() {
34 src_uri = (d.getVar('SRC_URI', True) or "").split() 34 src_uri = (d.getVar('SRC_URI', True) or "").split()
35 if len(src_uri) == 0: 35 if len(src_uri) == 0:
36 return 36 return
37 37
38 localdata = bb.data.createCopy(d) 38 localdata = bb.data.createCopy(d)
39 bb.data.update_data(localdata) 39 bb.data.update_data(localdata)
40 40
41 try: 41 try:
42 fetcher = bb.fetch2.Fetch(src_uri, localdata) 42 fetcher = bb.fetch2.Fetch(src_uri, localdata)
43 fetcher.checkstatus() 43 fetcher.checkstatus()
44 except bb.fetch2.BBFetchException, e: 44 except bb.fetch2.BBFetchException, e:
45 raise bb.build.FuncFailed(e) 45 raise bb.build.FuncFailed(e)
46} 46}
47 47
48addtask checkuriall after do_checkuri 48addtask checkuriall after do_checkuri