summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
diff options
context:
space:
mode:
authorPeter Bergin <peter@berginkonsult.se>2021-01-29 10:50:54 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-29 21:21:53 +0000
commit55ead1be58679c3bcb7d1c141672b999d53e90ef (patch)
treeeee32ac289fcc4e5ced6ac62c6751be8286d0517 /meta/classes/buildhistory.bbclass
parente45227cb2c9e8506a35cb9c97a867e50c4d70962 (diff)
downloadpoky-55ead1be58679c3bcb7d1c141672b999d53e90ef.tar.gz
buildhistory.bbclass: avoid exception for empty BUILDHISTORY_FEATURES variable
An exception is fired when a BuildStarted event is sent to buildhistory bbclass and the variable BUILDHISTORY_FEATURES is not set. ERROR: Execution of event handler 'buildhistory_eventhandler' failed Traceback (most recent call last): File "<...>/meta/classes/buildhistory.bbclass", line 862, in buildhistory_eventhandler(e=<bb.event.BuildStarted object at 0x7f94c3810250>): python buildhistory_eventhandler() { > if e.data.getVar('BUILDHISTORY_FEATURES').strip(): reset = e.data.getVar("BUILDHISTORY_RESET") AttributeError: 'NoneType' object has no attribute 'strip' This can happen in a multiconfig build where the default configuration use the buildhistory class but not the configuration in mc. It should be a rare case that this happens and it was found in a missconfigured build. (From OE-Core rev: a74e30a4de02c8efd3e7102ba7a4fe06df53cc34) Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r--meta/classes/buildhistory.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index daae056144..117a44eaf3 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -859,7 +859,7 @@ END
859} 859}
860 860
861python buildhistory_eventhandler() { 861python buildhistory_eventhandler() {
862 if e.data.getVar('BUILDHISTORY_FEATURES').strip(): 862 if (e.data.getVar('BUILDHISTORY_FEATURES') or "").strip():
863 reset = e.data.getVar("BUILDHISTORY_RESET") 863 reset = e.data.getVar("BUILDHISTORY_RESET")
864 olddir = e.data.getVar("BUILDHISTORY_OLD_DIR") 864 olddir = e.data.getVar("BUILDHISTORY_OLD_DIR")
865 if isinstance(e, bb.event.BuildStarted): 865 if isinstance(e, bb.event.BuildStarted):