summaryrefslogtreecommitdiffstats
path: root/external/poky/bitbake/lib/bb/event.py
diff options
context:
space:
mode:
Diffstat (limited to 'external/poky/bitbake/lib/bb/event.py')
-rw-r--r--external/poky/bitbake/lib/bb/event.py40
1 files changed, 6 insertions, 34 deletions
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)