cooker/siggen: Reset siggen when reparsing
PATCH 1/2 cooker/siggen: Reset siggen when reparsing
If we don't do this, we get basehash mismatch errors occurring from the reparse which would then set bitbake's error exit code.
This for example would cause oe-selftest -r bbtests.BitbakeTests.test_bbappend_order to fail with a non-zero BB_SERVER_TIMEOUT.
Signed-off-by Richard Purdie <[email protected]>
--- lib/bb/cooker.py | 1 + lib/bb/siggen.py | 3 +++ 2 files changed, 4 insertions(+)
lib/bb/cooker.py +1 -0
@@ -1468,6 +1468,7 @@ class BBCooker: self.updateCacheSync() if self.state != state.parsing and not self.parsecache_valid: + bb.parse.siggen.reset(self.data) self.parseConfiguration () if CookerFeatures.SEND_SANITYEVENTS in self.featureset: for mc in self.multiconfigs:
lib/bb/siggen.py +3 -0
@@ -94,6 +94,9 @@ class SignatureGeneratorBasic(SignatureGenerator): else: self.checksum_cache = None + def reset(self, data): + self.__init__(data) + def init_rundepcheck(self, data): self.taskwhitelist = data.getVar("BB_HASHTASK_WHITELIST") or None if self.taskwhitelist:
Signature · 1 line
2.7.4
PATCH 2/2 server/process: Ensure we don't loop on client EOFError
The server currently crashes if we hit an EOFError due to controllersock still being in ready and the continue meaning ready isn't re-evaluated. Setting the value to False can mean the shutdown code doesn't handle the situation cleanly.
Clear ready to avoid the crash/loop instead and handle any OSError whilst we're in here.
Signed-off-by Richard Purdie <[email protected]>
--- lib/bb/server/process.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/bb/server/process.py +2 -2
@@ -164,7 +164,7 @@ class ProcessServer(multiprocessing.Process): self.haveui = True - except EOFError: + except (EOFError, OSError): print("Disconnecting Client") fds.remove(self.controllersock) fds.remove(self.command_channel)
@@ -190,7 +190,7 @@ class ProcessServer(multiprocessing.Process): command = self.command_channel.get() except EOFError: # Client connection shutting down - self.command_channel = False + ready = [] continue if command[0] == "terminateServer": self.quit = True
Signature · 1 line
2.7.4