summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/utility-tasks.bbclass31
1 files changed, 8 insertions, 23 deletions
diff --git a/meta/classes/utility-tasks.bbclass b/meta/classes/utility-tasks.bbclass
index db22973402..aeac2bce40 100644
--- a/meta/classes/utility-tasks.bbclass
+++ b/meta/classes/utility-tasks.bbclass
@@ -50,33 +50,18 @@ python do_rebuild() {
50addtask checkuri 50addtask checkuri
51do_checkuri[nostamp] = "1" 51do_checkuri[nostamp] = "1"
52python do_checkuri() { 52python do_checkuri() {
53 import sys 53 src_uri = (bb.data.getVar('SRC_URI', d, True) or "").split()
54 if len(src_uri) == 0:
55 return
54 56
55 localdata = bb.data.createCopy(d) 57 localdata = bb.data.createCopy(d)
56 bb.data.update_data(localdata) 58 bb.data.update_data(localdata)
57 59
58 src_uri = bb.data.getVar('SRC_URI', localdata, 1) 60 try:
59 61 fetcher = bb.fetch2.Fetch(src_uri, localdata)
60 try: 62 fetcher.checkstatus()
61 bb.fetch.init(src_uri.split(),d) 63 except bb.fetch2.BBFetchException, e:
62 except bb.fetch.NoMethodError: 64 raise bb.build.FuncFailed(e)
63 (type, value, traceback) = sys.exc_info()
64 raise bb.build.FuncFailed("No method: %s" % value)
65
66 try:
67 bb.fetch.checkstatus(localdata)
68 except bb.fetch.MissingParameterError:
69 (type, value, traceback) = sys.exc_info()
70 raise bb.build.FuncFailed("Missing parameters: %s" % value)
71 except bb.fetch.FetchError:
72 (type, value, traceback) = sys.exc_info()
73 raise bb.build.FuncFailed("Fetch failed: %s" % value)
74 except bb.fetch.MD5SumError:
75 (type, value, traceback) = sys.exc_info()
76 raise bb.build.FuncFailed("MD5 failed: %s" % value)
77 except:
78 (type, value, traceback) = sys.exc_info()
79 raise bb.build.FuncFailed("Unknown fetch Error: %s" % value)
80} 65}
81 66
82addtask checkuriall after do_checkuri 67addtask checkuriall after do_checkuri