summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/base.bbclass39
1 files changed, 39 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index b7459bc996..c8330db465 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -552,6 +552,45 @@ base_do_fetchall() {
552 : 552 :
553} 553}
554 554
555addtask checkuri
556do_checkuri[nostamp] = "1"
557python do_checkuri() {
558 import sys
559
560 localdata = bb.data.createCopy(d)
561 bb.data.update_data(localdata)
562
563 src_uri = bb.data.getVar('SRC_URI', localdata, 1)
564
565 try:
566 bb.fetch.init(src_uri.split(),d)
567 except bb.fetch.NoMethodError:
568 (type, value, traceback) = sys.exc_info()
569 raise bb.build.FuncFailed("No method: %s" % value)
570
571 try:
572 bb.fetch.checkstatus(localdata)
573 except bb.fetch.MissingParameterError:
574 (type, value, traceback) = sys.exc_info()
575 raise bb.build.FuncFailed("Missing parameters: %s" % value)
576 except bb.fetch.FetchError:
577 (type, value, traceback) = sys.exc_info()
578 raise bb.build.FuncFailed("Fetch failed: %s" % value)
579 except bb.fetch.MD5SumError:
580 (type, value, traceback) = sys.exc_info()
581 raise bb.build.FuncFailed("MD5 failed: %s" % value)
582 except:
583 (type, value, traceback) = sys.exc_info()
584 raise bb.build.FuncFailed("Unknown fetch Error: %s" % value)
585}
586
587addtask checkuriall after do_checkuri
588do_checkuriall[recrdeptask] = "do_checkuri"
589do_checkuriall[nostamp] = "1"
590base_do_checkuriall() {
591 :
592}
593
555addtask buildall after do_build 594addtask buildall after do_build
556do_buildall[recrdeptask] = "do_build" 595do_buildall[recrdeptask] = "do_build"
557base_do_buildall() { 596base_do_buildall() {