From 8274ccae0d81d831d8b5d5a943519cbd1e4879dd Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 11 Jul 2018 16:56:51 +0200 Subject: classes/buildhistory: properly process escaped chars from pkgdata All values written out to pkgdata are escaped (see write_if_exists() in package.bbclass). In practice there tend not to be characters that need escaping except in the scriptlets (pkg_preinst, pkg_postinst, pkg_prerm and pkg_postrm) where currently we still see the escape codes in the corresponding files within buildhistory (e.g. \n and \t) and thus also in the output of buildhistory-diff, hindering proper diffing of changes. To fix this, when we read values from pkgdata and write them out to buildhistory, we need to interpret the escape codes by doing the exact reverse of what we do in package.bbclass. (From OE-Core rev: c258379181a438cb01728d223b3d05e0ab205941) Signed-off-by: Paul Eggleton Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/classes/buildhistory.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/classes') diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 2e5213e66e..40b292b139 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -245,7 +245,7 @@ python buildhistory_emit_pkghistory() { key = item[0] if key.endswith('_' + pkg): key = key[:-len(pkg)-1] - pkgdata[key] = item[1] + pkgdata[key] = item[1].encode('latin-1').decode('unicode_escape') pkge = pkgdata.get('PKGE', '0') pkgv = pkgdata['PKGV'] -- cgit v1.2.3-54-g00ecf