Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] buildhistory.bbclass: fix regression from FILES_INFO changes
@ 2021-11-17  1:06 S. Lockwood-Childs
  2021-11-19 10:36 ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: S. Lockwood-Childs @ 2021-11-17  1:06 UTC (permalink / raw)
  To: openembedded-core

Started getting a stack trace during packagedata task for a
recipe that built fine in hardknott

 *** 0002:buildhistory_emit_pkghistory(d)
     0003:
File: 'meta/classes/buildhistory.bbclass', lineno: 313, function: buildhistory_emit_pkghistory
     0309:            pkginfo.filevars[filevar] = localdata.getVar(filevar) or ""
     0310:
     0311:        # Gather information about packaged files
     0312:        val = localdata.getVar('FILES_INFO') or ''
 *** 0313:        dictval = json.loads(val)
     0314:        filelist = list(dictval.keys())
     0315:        filelist.sort()
     0316:        pkginfo.filelist = " ".join([shlex.quote(x) for x in filelist])
 ...
 Exception: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

which turns out to mean FILES_INFO is undefined for the main package built by
this recipe (FILES_INFO lookup for other packages such as -dev seemed to work fine).

Tracked the regression down to this commit:
    package/scripts: Fix FILES_INFO handling
    OE-Core rev: a1190903e0a61a12c9854c96af918ae8d12c6327

If buildhistory.bbclass uses the same per-package syntax to read
FILES_INFO as package.bbclass uses now when setting it, then
this regression goes away.

Signed-off-by: S. Lockwood-Childs <sjl@vctlabs.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 7c44fec2d1..99300ab431 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -309,7 +309,7 @@ python buildhistory_emit_pkghistory() {
             pkginfo.filevars[filevar] = localdata.getVar(filevar) or ""
 
         # Gather information about packaged files
-        val = localdata.getVar('FILES_INFO') or ''
+        val = localdata.getVar('FILES_INFO:%s' % pkg) or ''
         dictval = json.loads(val)
         filelist = list(dictval.keys())
         filelist.sort()
-- 
2.20.1



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

end of thread, other threads:[~2021-11-19 10:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-17  1:06 [PATCH] buildhistory.bbclass: fix regression from FILES_INFO changes S. Lockwood-Childs
2021-11-19 10:36 ` [OE-core] " Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox