diff options
-rw-r--r-- | meta/classes/base.bbclass | 39 |
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 | ||
555 | addtask checkuri | ||
556 | do_checkuri[nostamp] = "1" | ||
557 | python 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 | |||
587 | addtask checkuriall after do_checkuri | ||
588 | do_checkuriall[recrdeptask] = "do_checkuri" | ||
589 | do_checkuriall[nostamp] = "1" | ||
590 | base_do_checkuriall() { | ||
591 | : | ||
592 | } | ||
593 | |||
555 | addtask buildall after do_build | 594 | addtask buildall after do_build |
556 | do_buildall[recrdeptask] = "do_build" | 595 | do_buildall[recrdeptask] = "do_build" |
557 | base_do_buildall() { | 596 | base_do_buildall() { |