From 48ad94bac0752103121a7cf36a3fc66d9ecb969f Mon Sep 17 00:00:00 2001 From: Haiqing Bai Date: Fri, 23 Feb 2024 02:19:31 +0800 Subject: [PATCH] build-pkgs: Fixed "exit on failure" feature broken "-e" option of build-pkgs means exiting on any package build failure instead of continuing to run. This feature was broken during the code merging, now brings the feature back. Test Plan: Pass: For monolithic build, package build failure should result in a safe exit with '-e' option: build-pkgs -e Pass: For single build with '-p', package build failure should result in a safe exit with '-e' option: build-pkgs -e -p Closes-bug: 2054720 Change-Id: I5bf2089aa3559a8131f0e238a75edea87733dea6 Signed-off-by: Haiqing Bai --- build-tools/stx/build-pkgs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-tools/stx/build-pkgs b/build-tools/stx/build-pkgs index e956fede..a8feaa96 100755 --- a/build-tools/stx/build-pkgs +++ b/build-tools/stx/build-pkgs @@ -1594,6 +1594,9 @@ class BuildController(): logger.warning('Notified dsc_depend to retrieve %s', done_pkg_name) self.req_kill_task('sbuild', done_dsc) logger.debug('Require pkgbuilder to clean the task for %s', done_pkg_name) + if self.attrs['exit_on_fail']: + logger.error("Exiting due to failed package build") + return continue self.req_kill_task('sbuild', done_dsc) logger.debug('Require pkgbuilder to clean the task for %s', done_pkg_name)