diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2008-05-05 16:53:43 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2008-05-05 16:53:43 +0000 |
commit | 6df325136f4d65e63988941a0f8c58116cb19ca1 (patch) | |
tree | 1c7fe6e337a810dc71de9d63c7fb696a992bc293 /classes | |
parent | 96710f82ed8e851e11109b0dcd251bf012438a0e (diff) |
base.bbclass: Add checkuri and checkuriall tasks from Poky
Diffstat (limited to 'classes')
-rw-r--r-- | classes/base.bbclass | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index c459d78fae..b653bec83f 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -561,6 +561,45 @@ base_do_fetchall() { : } +addtask checkuri +do_checkuri[nostamp] = "1" +python do_checkuri() { + import sys + + localdata = bb.data.createCopy(d) + bb.data.update_data(localdata) + + src_uri = bb.data.getVar('SRC_URI', localdata, 1) + + try: + bb.fetch.init(src_uri.split(),d) + except bb.fetch.NoMethodError: + (type, value, traceback) = sys.exc_info() + raise bb.build.FuncFailed("No method: %s" % value) + + try: + bb.fetch.checkstatus(localdata) + except bb.fetch.MissingParameterError: + (type, value, traceback) = sys.exc_info() + raise bb.build.FuncFailed("Missing parameters: %s" % value) + except bb.fetch.FetchError: + (type, value, traceback) = sys.exc_info() + raise bb.build.FuncFailed("Fetch failed: %s" % value) + except bb.fetch.MD5SumError: + (type, value, traceback) = sys.exc_info() + raise bb.build.FuncFailed("MD5 failed: %s" % value) + except: + (type, value, traceback) = sys.exc_info() + raise bb.build.FuncFailed("Unknown fetch Error: %s" % value) +} + +addtask checkuriall after do_checkuri +do_checkuriall[recrdeptask] = "do_checkuri" +do_checkuriall[nostamp] = "1" +base_do_checkuriall() { + : +} + addtask buildall after do_build do_buildall[recrdeptask] = "do_build" base_do_buildall() { |