All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] classes/buildhistory: fix expansion of escape sequences
@ 2014-01-25 21:25 Paul Eggleton
  2014-01-25 22:10 ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Eggleton @ 2014-01-25 21:25 UTC (permalink / raw)
  To: openembedded-core

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>
---
 meta/classes/buildhistory.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index e9a9c3b..debeea8 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -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']
-- 
1.8.5.3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-05 22:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-25 21:25 [PATCH] classes/buildhistory: fix expansion of escape sequences Paul Eggleton
2014-01-25 22:10 ` Khem Raj
2014-02-05 19:26   ` Saul Wold
2014-02-05 22:13     ` Paul Eggleton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.