Rename '--no-source-rpm' to '--skip-srcrpm'
authorLi Jinjing <jinjingx.li@intel.com>
Mon, 13 Oct 2014 07:50:34 +0000 (15:50 +0800)
committerLi Jinjing <jinjingx.li@intel.com>
Mon, 13 Oct 2014 07:54:56 +0000 (15:54 +0800)
Change-Id: I3d916e4dc9e9bf6c0f908ceeddca2dc8694ccb0a
Signed-off-by: Li Jinjing <jinjingx.li@intel.com>
depanneur

index 8e5b128b5430978214a04da51a7412062a9b2f1d..8764c7ba488397ce294126edf8e5b9de6040c2c0 100755 (executable)
--- a/depanneur
+++ b/depanneur
@@ -98,7 +98,7 @@ my $help = 0;                   # show help information
 my $keepgoing = 0;              # TODO: clean up
 my $clean_repos = 0;            # clean corresponding local rpm repos
 my $create_baselibs = 0;        # create baselibs packages if baselibs.conf exists
-my $no_source_rpm = 0;          # don't generate source rpm package if $no_source_rpm == 1
+my $skip_srcrpm = 0;            # don't generate source rpm package if $skip_srcrpm == 1
 
 my $virtualenv = "$ENV{'VIRTUAL_ENV'}";    # virtual env dir, default is '/'
 my $build_root = $ENV{TIZEN_BUILD_ROOT};   # depanneur output dir
@@ -203,7 +203,7 @@ GetOptions (
     "spec=s" => \$arg_spec,
     "clean-repos" => \$clean_repos,
     "baselibs" => \$create_baselibs,
-    "no-source-rpm" => \$no_source_rpm,
+    "skip-srcrpm" => \$skip_srcrpm,
     );
 
 if ( $help ) {
@@ -485,7 +485,7 @@ mkdir_p($success_logs_path);
 mkdir_p($fail_logs_path);
 mkdir_p($cache_path);
 mkdir_p($rpm_repo_path);
-if ($no_source_rpm == 0){
+if ($skip_srcrpm == 0){
     mkdir_p($srpm_repo_path);
 }
 
@@ -1106,7 +1106,7 @@ sub createrepo
     my $dist = shift;
     my $extra_opts = "--changelog-limit=0 -q";
 
-    if ($no_source_rpm == 0){
+    if ($skip_srcrpm == 0){
         my_system("touch $srpm_repo_path");
     }
     my_system("touch $rpm_repo_path");
@@ -1707,7 +1707,7 @@ sub build_package {
         my_system("tar -zcf $source_tar $tmp_dir") if ($source_tar ne "");
     }
 
-    push @args, "--stage=\"-bb\"" if ($no_source_rpm == 1);
+    push @args, "--stage=\"-bb\"" if ($skip_srcrpm == 1);
     $cmd = join(" ", @args);
     debug($cmd);
     my $ret = my_system ($cmd);
@@ -1741,7 +1741,7 @@ sub build_package {
                 #remove old srpms in local repo
                 #copy the new ones to local repo
                 update_repo_with_rpms(\%srpmpaths, @srpms);
-                if ($no_source_rpm == 0){
+                if ($skip_srcrpm == 0){
                    my_system ("cp $scratch/$srcrpmdirpath/*.rpm $srpm_repo_path");
                 }
             }
@@ -1947,7 +1947,7 @@ sub build_report
     $build_status_json{"build_details"} = \@build_details;
     $build_status_json{"html_report"} = "$localrepo/$dist/$arch/index.html";
     $build_status_json{"rpm_repo"} = "$rpm_repo_path";
-    if ($no_source_rpm == 0) {
+    if ($skip_srcrpm == 0) {
         $build_status_json{"srpm_repo"} = "$srpm_repo_path";
     }
     $build_status_json{"build_logs"} = "$localrepo/$dist/$arch/logs";
@@ -1959,7 +1959,7 @@ sub build_report
 
     info("generated html format report:\n     $localrepo/$dist/$arch/index.html" );
     info("generated RPM packages can be found from local repo:\n     $rpm_repo_path");
-    if ($no_source_rpm == 0){
+    if ($skip_srcrpm == 0){
         info("generated source RPM packages can be found from local repo:\n     $srpm_repo_path");
     }
     info("build logs can be found in:\n     $localrepo/$dist/$arch/logs");