[oe-commits] [openembedded-core] 08/43: classes/buildhistory: properly process escaped chars from pkgdata

git at git.openembedded.org git at git.openembedded.org
Tue Jul 17 08:14:04 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit a1093d9f7f83106baa814b440ee90e7bbb5bcc09
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Wed Jul 11 16:56:51 2018 +0200

    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.
    
    Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at 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 2e5213e..40b292b 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']

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list