[oe-commits] [bitbake] 14/26: event/runqueue: Drop StampUpdate event, its pointless/unused

git at git.openembedded.org git at git.openembedded.org
Thu Jul 11 00:09:34 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 58e7f53c1e596de512be9197ce6fb8dbf0c4253c
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Jul 3 18:34:07 2019 +0100

    event/runqueue: Drop StampUpdate event, its pointless/unused
    
    Whilst this class has existed for years, it doesn't have any
    users and has a questionable interface. Drop it to allow for further
    simplification and changes.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/event.py       | 17 -----------------
 lib/bb/runqueue.py    |  9 ---------
 lib/bb/tests/event.py |  8 --------
 lib/bb/ui/knotty.py   |  1 -
 4 files changed, 35 deletions(-)

diff --git a/lib/bb/event.py b/lib/bb/event.py
index 248fc1a..d44621e 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -404,23 +404,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"""
 
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 4614646..30b13d5 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -2528,17 +2528,8 @@ def start_runqueue_tasks(rqexec):
         for task in self.rq.scenequeue_notcovered:
             logger.debug(1, 'Not skipping task %s', task)
 
-        for mc in rqexec.rqdata.dataCaches:
-            target_pairs = []
-            for tid in rqexec.rqdata.target_tids:
-                (tidmc, fn, taskname, _) = split_tid_mcfn(tid)
-                if tidmc == mc:
-                    target_pairs.append((fn, taskname))
-
-            event.fire(bb.event.StampUpdate(target_pairs, rqexec.rqdata.dataCaches[mc].stamp), rqexec.cfgData)
         rqexec.sched.initbuildable()
 
-
 class TaskFailure(Exception):
     """
     Exception raised when a task in a runqueue fails
diff --git a/lib/bb/tests/event.py b/lib/bb/tests/event.py
index b6e40c6..9229b63 100644
--- a/lib/bb/tests/event.py
+++ b/lib/bb/tests/event.py
@@ -561,14 +561,6 @@ class EventClassesTest(unittest.TestCase):
         self.assertEqual(event.fn(1), callback(1))
         self.assertEqual(event.pid, EventClassesTest._worker_pid)
 
-    def test_StampUpdate(self):
-        targets = ["foo", "bar"]
-        stampfns = [lambda:"foobar"]
-        event = bb.event.StampUpdate(targets, stampfns)
-        self.assertEqual(event.targets, targets)
-        self.assertEqual(event.stampPrefix, stampfns)
-        self.assertEqual(event.pid, EventClassesTest._worker_pid)
-
     def test_BuildBase(self):
         """ Test base class for bitbake build events """
         name = "foo"
diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index 88f638f..1c72aa2 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -660,7 +660,6 @@ def main(server, eventHandler, params, tf = TerminalFilter):
             # ignore
             if isinstance(event, (bb.event.BuildBase,
                                   bb.event.MetadataEvent,
-                                  bb.event.StampUpdate,
                                   bb.event.ConfigParsed,
                                   bb.event.MultiConfigParsed,
                                   bb.event.RecipeParsed,

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list