From 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Mon, 2 Nov 2020 11:07:33 +0900 Subject: basesystem-jj recipes --- external/poky/bitbake/lib/bb/event.py | 40 ++++++----------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) (limited to 'external/poky/bitbake/lib/bb/event.py') diff --git a/external/poky/bitbake/lib/bb/event.py b/external/poky/bitbake/lib/bb/event.py index 5b1b094a..d1359f01 100644 --- a/external/poky/bitbake/lib/bb/event.py +++ b/external/poky/bitbake/lib/bb/event.py @@ -1,5 +1,3 @@ -# ex:ts=4:sw=4:sts=4:et -# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- """ BitBake 'Event' implementation @@ -9,21 +7,10 @@ BitBake build tools. # Copyright (C) 2003, 2004 Chris Larson # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. +# SPDX-License-Identifier: GPL-2.0-only # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -import os, sys -import warnings +import sys import pickle import logging import atexit @@ -136,6 +123,7 @@ def fire_class_handlers(event, d): ui_queue = [] @atexit.register def print_ui_queue(): + global ui_queue """If we're exiting before a UI has been spawned, display any queued LogRecords to the console.""" logger = logging.getLogger("BitBake") @@ -180,6 +168,7 @@ def print_ui_queue(): logger.removeHandler(stderr) else: logger.removeHandler(stdout) + ui_queue = [] def fire_ui_handlers(event, d): global _thread_lock @@ -357,7 +346,7 @@ def set_UIHmask(handlerNum, level, debug_domains, mask): def getName(e): """Returns the name of a class or class instance""" - if getattr(e, "__name__", None) == None: + if getattr(e, "__name__", None) is None: return e.__class__.__name__ else: return e.__name__ @@ -414,23 +403,6 @@ class RecipeTaskPreProcess(RecipeEvent): class RecipeParsed(RecipeEvent): """ Recipe Parsing Complete """ -class StampUpdate(Event): - """Trigger for any adjustment of the stamp files to happen""" - - def __init__(self, targets, stampfns): - self._targets = targets - self._stampfns = stampfns - Event.__init__(self) - - def getStampPrefix(self): - return self._stampfns - - def getTargets(self): - return self._targets - - stampPrefix = property(getStampPrefix) - targets = property(getTargets) - class BuildBase(Event): """Base class for bitbake build events""" @@ -536,7 +508,7 @@ class NoProvider(Event): extra = '' if not self._reasons: if self._close_matches: - extra = ". Close matches:\n %s" % '\n '.join(self._close_matches) + extra = ". Close matches:\n %s" % '\n '.join(sorted(set(self._close_matches))) if self._dependees: msg = "Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)%s" % (r, self._item, ", ".join(self._dependees), r, extra) -- cgit 1.2.3-korg