From: Rong Jinhui Date: Thu, 10 Sep 2015 02:49:32 +0000 (+0800) Subject: fix CentOS 7 require X-Git-Tag: submit/devel/20190730.074511~60^2~4^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c861404ea18b7ef0356a99d77ad891243b1ea31;p=tools%2Fdepanneur.git fix CentOS 7 require 1.add fail fast option 2.fix CentOS 7 require Change-Id: Ieefcd8c748fe6a7708ade54f5d1c06dd0fa39504 --- diff --git a/depanneur b/depanneur index 244998a..cef9459 100755 --- a/depanneur +++ b/depanneur @@ -86,7 +86,7 @@ my $includeall = 0; # build all content of including uncommitted and # untracked files my $upstream_branch = ""; # upstream branch name my $upstream_tag = ""; # upstream tag name used for generate tar ball -my $fallback_to_native = 0; # fallback to native packaging mode if export fails +my $fallback_to_native = 0; # fallback to native packaging mode if export fails my $squash_patches_until = ""; # Commit_ID used for generate one patch my $no_patch_export = 0; # don't generate patches if it's 1 my $packaging_dir = "packaging";# packaging dir @@ -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,6 +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) ***"); diff --git a/packaging/depanneur.spec b/packaging/depanneur.spec index 01b414d..dc15aa5 100644 --- a/packaging/depanneur.spec +++ b/packaging/depanneur.spec @@ -11,7 +11,11 @@ Requires: perl(YAML) Requires: perl(JSON) Requires: perl(HTML::Template) Requires: tizen-build >= 20140612 +%if 0%{?centos_ver} == 7 + +%else Requires: tizen-build-initvm-i586 >= 20140612 +%endif %ifarch x86_64 Requires: tizen-build-initvm-x86_64 >= 20140612 %endif