From: SoonKyu Park Date: Wed, 9 Sep 2015 06:34:45 +0000 (+0900) Subject: Add --fail-fast option X-Git-Tag: submit/devel/20190730.074511~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F17%2F47817%2F1;p=tools%2Fdepanneur.git Add --fail-fast option Change-Id: I7ae746caf649045571d5c2ca1498572204273bc8 --- diff --git a/depanneur b/depanneur index 244998a..b34935c 100755 --- a/depanneur +++ b/depanneur @@ -96,6 +96,7 @@ my $deps_build = 0; # build all packages specified packaged depend o my $dryrun = 0; # just show build order and don't build actually my $help = 0; # show help information my $keepgoing = 0; # TODO: clean up +my $fail_fast = 0; # stop build immediately if one of packages fails my $clean_repos = 0; # clean corresponding local rpm repos my $create_baselibs = 0; # create baselibs packages if baselibs.conf exists my $skip_srcrpm = 0; # don't generate source rpm package if $skip_srcrpm == 1 @@ -189,6 +190,7 @@ GetOptions ( "dryrun" => \$dryrun, "help|?" => \$help, "keepgoing" => \$keepgoing, + "fail-fast" => \$fail_fast, "overwrite" => \$overwrite, "debug" => \$debug, "incremental" => \$incremental, @@ -242,6 +244,9 @@ Available options: If a package build fails, do not abort and continue building other packages in the queue. + --fail-fast + If one of packages build fails, stop whole build immediately. + --incremental Build a package from the local git tree directly. This option does not produce packages now, it is very @@ -1497,7 +1502,11 @@ sub worker_thread { if ($status == 0) { $dirty = 1; } - } + if ($fail_fast && $status == 1) { + info("build failed, exit..."); + $TERM = 1; + } + } debug("*** build $name exit with status($status), is dirty:$dirty, (worker: $thread) ***"); return $status;