diff options
author | Phil Blundell <philb@gnu.org> | 2004-07-03 19:52:59 +0000 |
---|---|---|
committer | Phil Blundell <philb@gnu.org> | 2004-07-03 19:52:59 +0000 |
commit | 581d4eb8af00ee427dcfa084175f09ec487e80b8 (patch) | |
tree | 23908e407cc7592a2cbe6dc7652afad95abdb007 | |
parent | 36c37dfc11b4fbd934ee8fd3da39495b819b25a9 (diff) |
filter values stored in subpackage metadata file through string_escape codec
BKrev: 40e70e9bSnw3a9M2es4NLCCquqYxYw
-rw-r--r-- | classes/base.oeclass | 7 | ||||
-rw-r--r-- | classes/package.oeclass | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/classes/base.oeclass b/classes/base.oeclass index 8affad7a6c..5bffe724b5 100644 --- a/classes/base.oeclass +++ b/classes/base.oeclass @@ -589,6 +589,11 @@ python read_shlibdeps () { python read_subpackage_metadata () { import re + def decode(str): + import codecs + c = codecs.getdecoder("string_escape") + return c(str)[0] + data_file = oe.data.expand("${WORKDIR}/install/${PN}.package", d) if os.access(data_file, os.R_OK): f = file(data_file, 'r') @@ -598,7 +603,7 @@ python read_subpackage_metadata () { for l in lines: m = r.match(l) if m: - oe.data.setVar(m.group(1), m.group(2), d) + oe.data.setVar(m.group(1), decode(m.group(2)), d) } python __anonymous () { diff --git a/classes/package.oeclass b/classes/package.oeclass index 32da7df8d3..0a960f8409 100644 --- a/classes/package.oeclass +++ b/classes/package.oeclass @@ -200,9 +200,14 @@ python populate_packages () { break def write_if_exists(f, pkg, var): + def encode(str): + import codecs + c = codecs.getencoder("string_escape") + return c(str)[0] + val = oe.data.getVar('%s_%s' % (var, pkg), d, 1) if val: - f.write('%s_%s: %s\n' % (var, pkg, val)) + f.write('%s_%s: %s\n' % (var, pkg, encode(val))) data_file = os.path.join(workdir, "install", pn + ".package") f = open(data_file, 'w') |