summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-07-11 15:23:19 +0300
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-11-14 14:47:20 +0200
commitd56a4c56c462cc08740a6e53fc3a46c8339d036d (patch)
tree8c709a9c394ca3cbbbde1deb6eae4f165dee4244
parent62b7ddbaac7a3c27959b2c72e1545234f06d5983 (diff)
downloadgit-buildpackage-d56a4c56c462cc08740a6e53fc3a46c8339d036d.tar.gz
git-buildpackage-d56a4c56c462cc08740a6e53fc3a46c8339d036d.tar.bz2
git-buildpackage-d56a4c56c462cc08740a6e53fc3a46c8339d036d.zip
buildpackage-rpm: add --git-no-build option
Replaces and deprecates --git-export-only. The new option name is way better in line with the other option names. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rwxr-xr-xgbp/scripts/buildpackage_rpm.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/gbp/scripts/buildpackage_rpm.py b/gbp/scripts/buildpackage_rpm.py
index 5e24416e..74a8aeb3 100755
--- a/gbp/scripts/buildpackage_rpm.py
+++ b/gbp/scripts/buildpackage_rpm.py
@@ -461,6 +461,9 @@ def parse_args(argv, prefix, git_treeish=None):
cmd_group.add_config_file_option(option_name="posttag", dest="posttag",
help="hook run after a successful tag operation, default is '%(posttag)s'")
cmd_group.add_boolean_config_file_option(option_name="hooks", dest="hooks")
+ export_group.add_option("--git-no-build", action="store_true",
+ dest="no_build",
+ help="Don't run builder or the associated hooks")
export_group.add_config_file_option(option_name="export-dir", dest="export_dir", type="path",
help="Build topdir, also export the sources under EXPORT_DIR, default is '%(export-dir)s'")
export_group.add_config_file_option(option_name="rpmbuild-builddir", dest="build_dir", type="path",
@@ -504,6 +507,12 @@ def parse_args(argv, prefix, git_treeish=None):
if not options.tag and not options.tag_only:
gbp.log.err("'--%sretag' needs either '--%stag' or '--%stag-only'" % (prefix, prefix, prefix))
return None, None, None
+ # Use git_treeish as a way to print the warning only on the second parsing
+ # round
+ if options.export_only and git_treeish:
+ gbp.log.warn("Deprecated option '--git-export-only', please use "
+ "'--no-build' instead!")
+ options.no_build = True
return options, args, builder_args
@@ -636,7 +645,7 @@ def main(argv):
extra_env={'GBP_GIT_DIR': repo.git_dir,
'GBP_TMP_DIR': export_dir})(dir=export_dir)
# Do actual build
- if not options.export_only and not options.tag_only:
+ if not options.no_build and not options.tag_only:
if options.prebuild:
RunAtCommand(options.prebuild, shell=True,
extra_env={'GBP_GIT_DIR': repo.git_dir,