summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2018-07-11 16:56:50 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-18 10:18:41 +0100
commit2e8787593f92965544159bdaa3232d4f8b29004f (patch)
treee6a74bbd8424661b0753aa9e9b36d74dd1eff19c /meta/classes/buildhistory.bbclass
parent0bbb80d3817ee3a21319b0a3b85ef8fb3763b873 (diff)
downloadpoky-2e8787593f92965544159bdaa3232d4f8b29004f.tar.gz
classes/buildhistory: handle packaged files with names containing spaces
The FILELIST field of the package info file in the buildhistory repository is a space-separated list of all of the files in the package. If a name of a file packaged by a recipe contains a space character then of course the result was that we didn't handle its name properly. To fix that, use quotes around any filename containing spaces and at the other end use these quotes to extract the proper entries. Fixes [YOCTO #12742]. (From OE-Core rev: 801b705957dc683030d11393f43407d0b3506b6a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r--meta/classes/buildhistory.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 63980f72a5..2e5213e66e 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -77,6 +77,7 @@ python buildhistory_emit_pkghistory() {
77 77
78 import re 78 import re
79 import json 79 import json
80 import shlex
80 import errno 81 import errno
81 82
82 pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE') 83 pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE')
@@ -287,7 +288,7 @@ python buildhistory_emit_pkghistory() {
287 dictval = json.loads(val) 288 dictval = json.loads(val)
288 filelist = list(dictval.keys()) 289 filelist = list(dictval.keys())
289 filelist.sort() 290 filelist.sort()
290 pkginfo.filelist = " ".join(filelist) 291 pkginfo.filelist = " ".join([shlex.quote(x) for x in filelist])
291 292
292 pkginfo.size = int(pkgdata['PKGSIZE']) 293 pkginfo.size = int(pkgdata['PKGSIZE'])
293 294