def do_fetch(d):
    # Export function set
    bb.build.exec_func('base_do_fetch', d)

do_fetch(d)

def base_do_fetch(d):

    src_uri = (d.getVar('SRC_URI') or "").split()
    if not src_uri:
        return

    try:
        fetcher = bb.fetch2.Fetch(src_uri, d)
        fetcher.download()
    except bb.fetch2.BBFetchException as e:
        bb.fatal("Bitbake Fetcher Error: " + repr(e))

