[elbe-devel] [PATCH] elbepack: check-builder: switch to run_elbe_subcommand()

Thomas Weißschuh thomas.weissschuh at linutronix.de
Mon Aug 5 08:26:58 CEST 2024


run_elbe_subcommand() avoids spawning another python process.
It also provides better error reporting.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/commands/check-build.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/elbepack/commands/check-build.py b/elbepack/commands/check-build.py
index 3541e752db7a..68cba1b1c34a 100644
--- a/elbepack/commands/check-build.py
+++ b/elbepack/commands/check-build.py
@@ -16,7 +16,7 @@ import pexpect
 
 from elbepack import qemu_firmware
 from elbepack.aptpkgutils import parse_built_using
-from elbepack.directories import run_elbe
+from elbepack.directories import run_elbe_subcommand
 from elbepack.filesystem import TmpdirFilesystem
 from elbepack.log import elbe_logging
 from elbepack.shellhelper import env_add
@@ -107,7 +107,7 @@ class CheckBase:
 class CheckSchema(CheckBase):
 
     def run(self):
-        run_elbe(['validate', self.directory / 'source.xml'])
+        run_elbe_subcommand(['validate', self.directory / 'source.xml'])
 
 
 @CheckBase.register('cdrom')
@@ -680,5 +680,5 @@ exit 1
 class CheckRebuild(CheckBase):
 
     def run(self):
-        run_elbe(['initvm', 'submit', '--skip-build-source', self.directory / 'bin-cdrom.iso'],
-                 check=True)
+        run_elbe_subcommand(['initvm', 'submit', '--skip-build-source',
+                             self.directory / 'bin-cdrom.iso'])

---
base-commit: 149efadc6da6dbf3b26acc2979f24e173a7bbf2c
change-id: 20240805-check_build-run_elbe_subcommand-10574b58b01c

Best regards,
-- 
Thomas Weißschuh <thomas.weissschuh at linutronix.de>



More information about the elbe-devel mailing list