summaryrefslogtreecommitdiffstats
path: root/poky/bitbake
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-11-23 10:55:50 +1300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-12-06 09:42:11 -0500
commite2d5b61ddc1b3e5ab1cfa5e1ef3f2447fe011895 (patch)
tree883ae06977b8525775103238d7e34c0e702f75f9 /poky/bitbake
parent05d3807c8511ff91e8e8341e608ea1ea83047b04 (diff)
downloadtalos-openbmc-e2d5b61ddc1b3e5ab1cfa5e1ef3f2447fe011895.tar.gz
talos-openbmc-e2d5b61ddc1b3e5ab1cfa5e1ef3f2447fe011895.zip
poky: sumo refresh 64a257fa22..fa962ec72f
Update poky to sumo HEAD. Anuj Mittal (1): linux-yocto: update genericx86* SRCREV for 4.14 Martin Hundebøll (2): shadow: improve reproducibility by hard-coding shell path busybox: make busybox.links.{suid, nosuid} reproducible Paul Eggleton (1): socat: fix LICENSE Richard Purdie (10): sanity: Add check for WSL poky.conf: Update the distros we test against on the autobuilder poky.conf: Bump version for 2.5.2 sumo release build-appliance-image: Update to sumo head revision bitbake: server/process: Fix unclosed socket warnings upon server connection refused bitbake: lib/bb/server: Avoid UnboundLocalError traceback bitbake: server/process: Fix ConnectionRefusedError tracebacks bitbake: runqueue: Ensure disk monitor is started when no setscene tasks are run bitbake: process: Flush key output to logs bitbake: main: Don't use print() directly, use logger Change-Id: Ie14695232a8adecd2013d629208da320963532ce Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/bitbake')
-rwxr-xr-xpoky/bitbake/lib/bb/main.py2
-rw-r--r--poky/bitbake/lib/bb/runqueue.py11
-rw-r--r--poky/bitbake/lib/bb/server/process.py18
3 files changed, 18 insertions, 13 deletions
diff --git a/poky/bitbake/lib/bb/main.py b/poky/bitbake/lib/bb/main.py
index 732a31540..7dc953da6 100755
--- a/poky/bitbake/lib/bb/main.py
+++ b/poky/bitbake/lib/bb/main.py
@@ -448,7 +448,7 @@ def setup_bitbake(configParams, configuration, extrafeatures=None):
else:
logger.info("Reconnecting to bitbake server...")
if not os.path.exists(sockname):
- print("Previous bitbake instance shutting down?, waiting to retry...")
+ logger.info("Previous bitbake instance shutting down?, waiting to retry...")
i = 0
lock = None
# Wait for 5s or until we can get the lock
diff --git a/poky/bitbake/lib/bb/runqueue.py b/poky/bitbake/lib/bb/runqueue.py
index f2e52cf75..480a851ef 100644
--- a/poky/bitbake/lib/bb/runqueue.py
+++ b/poky/bitbake/lib/bb/runqueue.py
@@ -1371,6 +1371,12 @@ class RunQueue:
bb.event.fire(bb.event.DepTreeGenerated(depgraph), self.cooker.data)
if self.state is runQueueSceneInit:
+ if not self.dm_event_handler_registered:
+ res = bb.event.register(self.dm_event_handler_name,
+ lambda x: self.dm.check(self) if self.state in [runQueueSceneRun, runQueueRunning, runQueueCleanUp] else False,
+ ('bb.event.HeartbeatEvent',))
+ self.dm_event_handler_registered = True
+
dump = self.cooker.configuration.dump_signatures
if dump:
self.rqdata.init_progress_reporter.finish()
@@ -1387,11 +1393,6 @@ class RunQueue:
self.rqexe = RunQueueExecuteScenequeue(self)
if self.state is runQueueSceneRun:
- if not self.dm_event_handler_registered:
- res = bb.event.register(self.dm_event_handler_name,
- lambda x: self.dm.check(self) if self.state in [runQueueSceneRun, runQueueRunning, runQueueCleanUp] else False,
- ('bb.event.HeartbeatEvent',))
- self.dm_event_handler_registered = True
retval = self.rqexe.execute()
if self.state is runQueueRunInit:
diff --git a/poky/bitbake/lib/bb/server/process.py b/poky/bitbake/lib/bb/server/process.py
index 828159ed7..0749b5bc3 100644
--- a/poky/bitbake/lib/bb/server/process.py
+++ b/poky/bitbake/lib/bb/server/process.py
@@ -428,6 +428,8 @@ class BitBakeServer(object):
def _startServer(self):
print(self.start_log_format % (os.getpid(), datetime.datetime.now().strftime(self.start_log_datetime_format)))
+ sys.stdout.flush()
+
server = ProcessServer(self.bitbake_lock, self.sock, self.sockname)
self.configuration.setServerRegIdleCallback(server.register_idle_function)
writer = ConnectionWriter(self.readypipein)
@@ -443,6 +445,8 @@ class BitBakeServer(object):
server.server_timeout = self.configuration.server_timeout
server.xmlrpcinterface = self.configuration.xmlrpcinterface
print("Started bitbake server pid %d" % os.getpid())
+ sys.stdout.flush()
+
server.start()
def connectProcessServer(sockname, featureset):
@@ -451,16 +455,15 @@ def connectProcessServer(sockname, featureset):
# AF_UNIX has path length issues so chdir here to workaround
cwd = os.getcwd()
- try:
- os.chdir(os.path.dirname(sockname))
- sock.connect(os.path.basename(sockname))
- finally:
- os.chdir(cwd)
-
readfd = writefd = readfd1 = writefd1 = readfd2 = writefd2 = None
eq = command_chan_recv = command_chan = None
try:
+ try:
+ os.chdir(os.path.dirname(sockname))
+ sock.connect(os.path.basename(sockname))
+ finally:
+ os.chdir(cwd)
# Send an fd for the remote to write events to
readfd, writefd = os.pipe()
@@ -489,7 +492,8 @@ def connectProcessServer(sockname, featureset):
command_chan.close()
for i in [writefd, readfd1, writefd2]:
try:
- os.close(i)
+ if i:
+ os.close(i)
except OSError:
pass
sock.close()
OpenPOWER on IntegriCloud