diff options
author | Chris Larson <clarson@kergoth.com> | 2004-03-31 18:14:21 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2004-03-31 18:14:21 +0000 |
commit | 81f775b1be7f201954140292695746f28aadf281 (patch) | |
tree | 4e6f4fd0db59a67396a4f89c9e736fe75da8c1f5 /bin/oe/manifest.py | |
parent | 3ab3502883e89227305f50a90727796ffd83ebeb (diff) | |
download | bitbake-81f775b1be7f201954140292695746f28aadf281.tar.gz |
Fix manifest expansion.
Diffstat (limited to 'bin/oe/manifest.py')
-rw-r--r-- | bin/oe/manifest.py | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/bin/oe/manifest.py b/bin/oe/manifest.py index 00282a9af..b038a74aa 100644 --- a/bin/oe/manifest.py +++ b/bin/oe/manifest.py @@ -33,7 +33,7 @@ def parse (mfile, d): break if line.startswith("#"): continue - fields = getfields(oe.data.expand(line, d)) + fields = getfields(line) if not fields: continue manifest.append(fields) @@ -50,14 +50,16 @@ def emit (func, manifest, d): # str += "}\n" return str -def mangle (func, line): - src = line["src"] +def mangle (func, line, d): + import copy + newline = copy.copy(line) + src = oe.data.expand(newline["src"], d) if src: if not os.path.isabs(src): src = "${WORKDIR}/" + src - dest = line["dest"] + dest = newline["dest"] if not dest: return @@ -68,14 +70,14 @@ def mangle (func, line): dest = "${D}/" + dest elif func is "do_populate": - dest = "${WORKDIR}/install/" + line["pkg"] + "/" + dest + dest = "${WORKDIR}/install/" + newline["pkg"] + "/" + dest elif func is "do_stage": varmap = {} - varmap["${bindir}"] = "${STAGING_BINDIR}" - varmap["${libdir}"] = "${STAGING_LIBDIR}" - varmap["${includedir}"] = "${STAGING_INCDIR}" - varmap["${datadir}"] = "${STAGING_DIR}/share" + varmap["${bindir}"] = "${STAGING_DIR}/${HOST_SYS}/bin" + varmap["${libdir}"] = "${STAGING_DIR}/${HOST_SYS}/lib" + varmap["${includedir}"] = "${STAGING_DIR}/${HOST_SYS}/include" + varmap["${datadir}"] = "${STAGING_DATADIR}" matched = 0 for key in varmap.keys(): @@ -83,19 +85,20 @@ def mangle (func, line): dest = varmap[key] + "/" + dest[len(key):] matched = 1 if not matched: - line = None + newline = None return else: - line = None + newline = None return - line["src"] = src - line["dest"] = dest + newline["src"] = src + newline["dest"] = dest + return newline def emit_line (func, line, d): import copy newline = copy.deepcopy(line) - mangle(func, newline) + newline = mangle(func, newline, d) if not newline: return None @@ -105,13 +108,19 @@ def emit_line (func, line, d): src = newline["src"] dest = newline["dest"] if type is "d": - str = "install -d " + dest + str = "install -d " if mode: str += "-m %s " % mode + str += dest elif type is "f": if not src: return None - str = "install -D " + if dest.endswith("/"): + str = "install -d " + str += dest + "\n" + str += "install " + else: + str = "install -D " if mode: str += "-m %s " % mode str += src + " " + dest |