]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/buildhistory: fix expansion of escape sequences
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Sat, 25 Jan 2014 21:25:05 +0000 (21:25 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 3 Feb 2014 11:56:55 +0000 (11:56 +0000)
OE-Core commit 259b8718a31b886f8a158aeb5de164840c9a28b2 fixed UTF-8
errors but broke decoding of escape sequences in strings (e.g.
pkg_postinst scripts had \n \t in them instead of newlines and tabs.)
We need a second call to decode() here as specifying 'string_escape' as
the second parameter won't do anything.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/buildhistory.bbclass

index 545a42fe9171687b7a0f7b80106e441872ca2606..6b097ea20f7179694ba5852019d1a33d68f14c78 100644 (file)
@@ -190,7 +190,7 @@ python buildhistory_emit_pkghistory() {
                 key = item[0]
                 if key.endswith('_' + pkg):
                     key = key[:-len(pkg)-1]
-                pkgdata[key] = item[1].decode('utf-8''string_escape')
+                pkgdata[key] = item[1].decode('utf-8').decode('string_escape')
 
         pkge = pkgdata.get('PKGE', '0')
         pkgv = pkgdata['PKGV']