Skip to contentSkip to conversation

[1.46][PATCH 0/2] Patch review

bitbake Steve Sakoman 1 participant 3 messages Mar 27, 2022

lore
Share & tools
lore
#0 lore raw

Please review this set of patches for dunfell/1.46 and have comments back by end of day Tuesday.

Passed a-full on autobuilder:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/3433

The following changes since commit d22cc1e587c650fd5f90cda32f5720f8a3105aac:

tests/fetch: Handle upstream master -> main branch change (2022-02-23 18:11:51 +0000)

are available in the Git repository at:

git://git.openembedded.org/bitbake-contrib stable/1.46-nut
http://cgit.openembedded.org/bitbake-contrib/log/?h=stable/1.46-nut

Richard Purdie (2):
server/process: Note when commands complete in logs
tinfoil: Allow run_command not to wait on events

 lib/bb/server/process.py | 1 +
 lib/bb/tinfoil.py        | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

[bitbake][dunfell][1.46][PATCH 1/2] server/process: Note when commands complete in logs

From: Richard Purdie <[email protected]>

Its hard to tell from the server logs whether commands complete or not (or how long they take). Add extra info to allow more debugging of server timeouts.

(cherry picked from commit 56285ada585ec1481449522282b335bcb5a2671e)
---
 lib/bb/server/process.py | 1 +
 1 file changed, 1 insertion(+)
lib/bb/server/process.py +1 -0
index 7b135762..3c9ed706 100644
@@ -221,6 +221,7 @@ class ProcessServer(multiprocessing.Process):
                 try:
                     print("Running command %s" % command)
                     self.command_channel_reply.send(self.cooker.command.runCommand(command))
+                    print("Command Completed")
                 except Exception as e:
                    logger.exception('Exception in server main event loop running command %s (%s)' % (command, str(e)))
 
Signature · 1 line
2.25.1
#2 lore raw

[bitbake][dunfell][1.46][PATCH 2/2] tinfoil: Allow run_command not to wait on events

In reply to Steve Sakoman

From: Richard Purdie <[email protected]>

There are some commands where we want to see the events returned so allow the caller to request this. This also allows us to fix an infamous bug in the tinfoil testsuite in OE-Core.

(cherry picked from commit 0e8421c41d97d5d50a553d70c8f775d521f1a199)
---
 lib/bb/tinfoil.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/bb/tinfoil.py +2 -2
index ae690389..28f1e562 100644
@@ -448,7 +448,7 @@ class Tinfoil:
         self.run_actions(config_params)
         self.recipes_parsed = True
 
-    def run_command(self, command, *params):
+    def run_command(self, command, *params, handle_events=True):
         """
         Run a command on the server (as implemented in bb.command).
         Note that there are two types of command - synchronous and
@@ -468,7 +468,7 @@ class Tinfoil:
         try:
             result = self.server_connection.connection.runCommand(commandline)
         finally:
-            while True:
+            while handle_events:
                 event = self.wait_event()
                 if not event:
                     break
Signature · 1 line
2.25.1