Esempio n. 1
0
    debug(2,"BB %s: set_additional_vars" % file)

    src_uri = data.getVar('SRC_URI', d)
    if not src_uri:
        return
    src_uri = data.expand(src_uri, d)

    a = data.getVar('A', d)
    if a:
        a = data.expand(a, d).split()
    else:
        a = []

    from bb import fetch
    try:
        fetch.init(src_uri.split(), d)
    except fetch.NoMethodError:
        pass
    except bb.MalformedUrl,e:
        raise ParseError("Unable to generate local paths for SRC_URI due to malformed uri: %s" % e)

    a += fetch.localpaths(d)
    del fetch
    data.setVar('A', " ".join(a), d)


# Add us to the handlers list
from bb.parse import handlers
handlers.append({'supports': supports, 'handle': handle, 'init': init})
del handlers
Esempio n. 2
0
        ast.handleInclude(statements, fn, lineno, m, False)
        return

    m = __require_regexp__.match(s)
    if m:
        ast.handleInclude(statements, fn, lineno, m, True)
        return

    m = __export_regexp__.match(s)
    if m:
        ast.handleExport(statements, fn, lineno, m)
        return

    m = __unset_regexp__.match(s)
    if m:
        ast.handleUnset(statements, fn, lineno, m)
        return

    m = __unset_flag_regexp__.match(s)
    if m:
        ast.handleUnsetFlag(statements, fn, lineno, m)
        return

    raise ParseError("unparsed line: '%s'" % s, fn, lineno)


# Add us to the handlers list
from bb.parse import handlers
handlers.append({'supports': supports, 'handle': handle, 'init': init})
del handlers
Esempio n. 3
0
def feeder(lineno, s, fn, statements):
    m = __config_regexp__.match(s)
    if m:
        groupd = m.groupdict()
        ast.handleData(statements, fn, lineno, groupd)
        return

    m = __include_regexp__.match(s)
    if m:
        ast.handleInclude(statements, fn, lineno, m, False)
        return

    m = __require_regexp__.match(s)
    if m:
        ast.handleInclude(statements, fn, lineno, m, True)
        return

    m = __export_regexp__.match(s)
    if m:
        ast.handleExport(statements, fn, lineno, m)
        return

    raise ParseError("unparsed line: '%s'" % s, fn, lineno)


# Add us to the handlers list
from bb.parse import handlers

handlers.append({"supports": supports, "handle": handle, "init": init})
del handlers