summaryrefslogtreecommitdiff
path: root/classes/package.oeclass
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2004-07-03 19:52:59 +0000
committerPhil Blundell <philb@gnu.org>2004-07-03 19:52:59 +0000
commit581d4eb8af00ee427dcfa084175f09ec487e80b8 (patch)
tree23908e407cc7592a2cbe6dc7652afad95abdb007 /classes/package.oeclass
parent36c37dfc11b4fbd934ee8fd3da39495b819b25a9 (diff)
filter values stored in subpackage metadata file through string_escape codec
BKrev: 40e70e9bSnw3a9M2es4NLCCquqYxYw
Diffstat (limited to 'classes/package.oeclass')
-rw-r--r--classes/package.oeclass7
1 files changed, 6 insertions, 1 deletions
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')