[elbe-devel] [PATCH 07/21] elbepack: pbuilder: call update_pbuilder() directly

Thomas Weißschuh thomas.weissschuh at linutronix.de
Tue Aug 6 11:18:05 CEST 2024


Instead of going through "elbe control", call the update_pbuilder()
method directly. This reuses existing connections and improves the error
reporting.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/commands/pbuilder.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/elbepack/commands/pbuilder.py b/elbepack/commands/pbuilder.py
index 43582d989506..d27fd7c91b0f 100644
--- a/elbepack/commands/pbuilder.py
+++ b/elbepack/commands/pbuilder.py
@@ -87,12 +87,7 @@ def _update(control, args):
 
     print('Updating pbuilder')
 
-    try:
-        run_elbe(['control', 'update_pbuilder', prjdir], check=True)
-    except subprocess.CalledProcessError:
-        print('elbe control update_pbuilder Failed', file=sys.stderr)
-        print('Giving up', file=sys.stderr)
-        sys.exit(159)
+    control.service.update_pbuilder(prjdir)
 
     print('')
     print('Updating Pbuilder finished !')

-- 
2.46.0



More information about the elbe-devel mailing list