diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-12 16:53:41 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-13 08:07:00 +0100 |
commit | a3448ad15ec811bbf64aaf5d6496356d26516dfa (patch) | |
tree | 33f9c65cafb95c446f3347bf70a555a76f7cba47 /bitbake/lib/bb/cooker.py | |
parent | 0c91113c077d8efe01a7c9f788c9bdecbc6493bc (diff) | |
download | poky-a3448ad15ec811bbf64aaf5d6496356d26516dfa.tar.gz |
bitbake: server/process: Simplfy idle callback handler function
Having the idle callbacks abstracted via the configuration object
makes no sense. Its like this for historical reasons from the
multiple server backends but we don't need this now so simplfy.
(Bitbake rev: e56c49717355c9493b07d5fc80981a95ad8a0ec8)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index f6abc63487..9123605461 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -148,7 +148,7 @@ class BBCooker: | |||
148 | Manages one bitbake build run | 148 | Manages one bitbake build run |
149 | """ | 149 | """ |
150 | 150 | ||
151 | def __init__(self, configuration, featureSet=None): | 151 | def __init__(self, configuration, featureSet=None, idleCallBackRegister=None): |
152 | self.recipecaches = None | 152 | self.recipecaches = None |
153 | self.skiplist = {} | 153 | self.skiplist = {} |
154 | self.featureset = CookerFeatures() | 154 | self.featureset = CookerFeatures() |
@@ -158,6 +158,8 @@ class BBCooker: | |||
158 | 158 | ||
159 | self.configuration = configuration | 159 | self.configuration = configuration |
160 | 160 | ||
161 | self.idleCallBackRegister = idleCallBackRegister | ||
162 | |||
161 | bb.debug(1, "BBCooker starting %s" % time.time()) | 163 | bb.debug(1, "BBCooker starting %s" % time.time()) |
162 | sys.stdout.flush() | 164 | sys.stdout.flush() |
163 | 165 | ||
@@ -210,7 +212,7 @@ class BBCooker: | |||
210 | cooker.process_inotify_updates() | 212 | cooker.process_inotify_updates() |
211 | return 1.0 | 213 | return 1.0 |
212 | 214 | ||
213 | self.configuration.server_register_idlecallback(_process_inotify_updates, self) | 215 | self.idleCallBackRegister(_process_inotify_updates, self) |
214 | 216 | ||
215 | # TOSTOP must not be set or our children will hang when they output | 217 | # TOSTOP must not be set or our children will hang when they output |
216 | try: | 218 | try: |
@@ -1423,7 +1425,7 @@ class BBCooker: | |||
1423 | return True | 1425 | return True |
1424 | return retval | 1426 | return retval |
1425 | 1427 | ||
1426 | self.configuration.server_register_idlecallback(buildFileIdle, rq) | 1428 | self.idleCallBackRegister(buildFileIdle, rq) |
1427 | 1429 | ||
1428 | def buildTargets(self, targets, task): | 1430 | def buildTargets(self, targets, task): |
1429 | """ | 1431 | """ |
@@ -1494,7 +1496,7 @@ class BBCooker: | |||
1494 | if 'universe' in targets: | 1496 | if 'universe' in targets: |
1495 | rq.rqdata.warn_multi_bb = True | 1497 | rq.rqdata.warn_multi_bb = True |
1496 | 1498 | ||
1497 | self.configuration.server_register_idlecallback(buildTargetsIdle, rq) | 1499 | self.idleCallBackRegister(buildTargetsIdle, rq) |
1498 | 1500 | ||
1499 | 1501 | ||
1500 | def getAllKeysWithFlags(self, flaglist): | 1502 | def getAllKeysWithFlags(self, flaglist): |