BSR: Gracefully exit
authorhyokeun.jeon <hyokeun.jeon@samsung.com>
Wed, 14 Apr 2021 09:21:18 +0000 (18:21 +0900)
committerhyokeun.jeon <hyokeun.jeon@samsung.com>
Wed, 14 Apr 2021 09:21:18 +0000 (18:21 +0900)
Change-Id: Ieec01bf01c52b8b51f7ab8b89c21ce5473d52c06

depanneur

index 7ba695ca4c32995747c71f14df0a8fb720abbda6..e1e0da0f6dffd446a9e714c0820776a98003fd52 100755 (executable)
--- a/depanneur
+++ b/depanneur
@@ -2392,9 +2392,9 @@ sub build_report
     info("build logs can be found in:\n     $localrepo/$dist/$arch/logs");
     info("build roots located in:\n     $scratch_dir.*");
     if (%errors || %expansion_errors || @export_errors || ($succeeded_packages == 0 && @skipped == 0)) {
-        exit 1;
+        return 1;
     }
-
+    return 0;
 }
 
 #---------------------------------------------------------------------
@@ -3245,7 +3245,6 @@ while ((threads->list() > 0)) {
     sleep(1);
 }
 update_repo();
-build_report();
+my $build_status = build_report();
 profiling_report();
-
-exit 0
+exit $build_status