fix CentOS 7 require
authorRong Jinhui <jinhui.rong@samsung.com>
Thu, 10 Sep 2015 02:49:32 +0000 (10:49 +0800)
committeryang.zhang <y0169.zhang@samsung.com>
Mon, 29 Feb 2016 01:23:49 +0000 (09:23 +0800)
1.add fail fast option
2.fix CentOS 7 require

Change-Id: Ieefcd8c748fe6a7708ade54f5d1c06dd0fa39504

depanneur
packaging/depanneur.spec

index 244998a6686def8a4442675b07c193ef32c7fc87..cef9459505a6b6dd25575d36fa1e379080a1378b 100755 (executable)
--- 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) ***");
index 01b414d06d44a40d01715c2bca01708ba2d64ae6..dc15aa52029fc768236b81cd16f5703fcb7e092b 100644 (file)
@@ -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