public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Steve Sakoman" <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][dunfell 15/28] buildhistory.bbclass: avoid exception for empty BUILDHISTORY_FEATURES variable
Date: Mon,  8 Feb 2021 03:52:07 -1000	[thread overview]
Message-ID: <6b5ff13fcbcfe980b50893a8bfe86ebf7a4ef3bf.1612792088.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1612792088.git.steve@sakoman.com>

From: Peter Bergin <peter@berginkonsult.se>

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.

Signed-off-by: Peter Bergin <peter@berginkonsult.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a74e30a4de02c8efd3e7102ba7a4fe06df53cc34)
Signed-off-by: Steve Sakoman <steve@sakoman.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 156324d339..8a1359acbe 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -852,7 +852,7 @@ END
 }
 
 python buildhistory_eventhandler() {
-    if e.data.getVar('BUILDHISTORY_FEATURES').strip():
+    if (e.data.getVar('BUILDHISTORY_FEATURES') or "").strip():
         reset = e.data.getVar("BUILDHISTORY_RESET")
         olddir = e.data.getVar("BUILDHISTORY_OLD_DIR")
         if isinstance(e, bb.event.BuildStarted):
-- 
2.25.1


  parent reply	other threads:[~2021-02-08 13:54 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 13:51 [OE-core][dunfell 00/28] Patch review Steve Sakoman
2021-02-08 13:51 ` [OE-core][dunfell 01/28] pseudo: Update to include passwd and file renaming fixes Steve Sakoman
2021-02-08 13:51 ` [OE-core][dunfell 02/28] sanity.bbclass: Check if PSEUDO_IGNORE_PATHS and paths under pseudo control overlap Steve Sakoman
2021-02-08 13:51 ` [OE-core][dunfell 03/28] ca-certificates: upgrade 20190110 -> 20200601 Steve Sakoman
2021-02-08 13:51 ` [OE-core][dunfell 04/28] ca-certificates: correct upstream version check Steve Sakoman
2021-02-08 13:51 ` [OE-core][dunfell 05/28] ca-certificates: upgrade 20200601 -> 20210119 Steve Sakoman
2021-02-08 13:51 ` [OE-core][dunfell 06/28] cve-check: replace Looseversion with custom version class Steve Sakoman
2021-02-08 13:51 ` [OE-core][dunfell 07/28] cve_check: add CVE_VERSION_SUFFIX to indicate suffix in versioning Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 08/28] openssl: set CVE_VERSION_SUFFIX Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 09/28] package.bbclass: hash equivalency and pr service Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 10/28] package: Ensure do_packagedata is cleaned correctly Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 11/28] kernel.bbclass: fix deployment for initramfs images Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 12/28] linux-yocto/5.4: update to v5.4.90 Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 13/28] linux-yocto-rt/5.4: fix 5.4-stable caused build breakage Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 14/28] linux-yocto/5.4: update to v5.4.94 Steve Sakoman
2021-02-08 13:52 ` Steve Sakoman [this message]
2021-02-08 13:52 ` [OE-core][dunfell 16/28] npm.bbclass: use python3 for npm config Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 17/28] python3: Use addtask statement instead of task dependencies Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 18/28] image_types: Ensure tar archives are reproducible Steve Sakoman
2021-02-08 14:20   ` Martin Jansa
2021-02-08 15:52     ` Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 19/28] qemu.inc: Should depend on qemu-system-native, not qemu-native Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 20/28] glib-2.0: Rename patch file for CVE-2020-35457 Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 21/28] layer.conf: fix sanity error for PATH variable in extensible SDK workflow Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 22/28] lib/oe/patch.py: Ignore scissors line on applying patch Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 23/28] opkg: Fix build reproducibility issue Steve Sakoman
2021-02-09 14:34   ` Richard Purdie
2021-02-09 14:40     ` Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 24/28] sstatesig: Add descriptive error message to getpwuid/getgrgid "uid/gid not found" KeyError Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 25/28] rng-tools: fix rngd_jitter initialization Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 26/28] classes/image_types_wic: Reorder do_flush_pseudodb Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 27/28] oeqa: wic: Add tests for permissions and change-directory Steve Sakoman
2021-02-08 13:52 ` [OE-core][dunfell 28/28] wic/selftest: test_permissions also test bitbake image Steve Sakoman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6b5ff13fcbcfe980b50893a8bfe86ebf7a4ef3bf.1612792088.git.steve@sakoman.com \
    --to=steve@sakoman.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox