<arg><option>--git-postbuild=</option><replaceable>COMMAND</replaceable></arg>
<arg><option>--git-postexport=</option><replaceable>COMMAND</replaceable></arg>
<arg><option>--git-prebuild=</option><replaceable>COMMAND</replaceable></arg>
+ <arg><option>--git-[no-]build</option></arg>
<arg><option>--git-[no-]hooks</option></arg>
<arg><option>--git-debian-tag=</option><replaceable>tag-format</replaceable></arg>
<arg><option>--git-upstream-tag=</option><replaceable>tag-format</replaceable></arg>
</listitem>
</varlistentry>
<varlistentry>
+ <term><option>--git-[no-]build</option>
+ </term>
+ <listitem>
+ <para>
+ Enable builder. Note: <option>--git-no-build</option> causes the
+ postbuild hook to be disabled, too.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><option>--git-[no-]hooks</option>
</term>
<listitem>
'prebuild' : '',
'postexport' : '',
'postimport' : '',
+ 'build' : 'True',
'hooks' : 'True',
'debian-tag' : 'debian/%(version)s',
'debian-tag-msg' : '%(pkg)s Debian release %(version)s',
'postimport':
("hook run after a successful import, "
"default is '%(postimport)s'"),
+ 'build':
+ ("Enable running builder, default is %(build)s"),
'hooks':
("Enable running all hooks, default is %(hooks)s"),
'time-machine':
os.environ['GIT_PBUILDER_OPTIONS'] = options.pbuilder_options
+def disable_builder(options):
+ """Disable builder (and postbuild hook)"""
+ gbp.log.info("Disabling builder and postbuild hook")
+ options.builder = ''
+ options.postbuild = ''
+ options.pbuilder = None
+ options.qemubuilder = None
+
+
def disable_hooks(options):
"""Disable all hooks (except for builder)"""
for hook in ['cleaner', 'postexport', 'prebuild', 'postbuild', 'posttag']:
cmd_group.add_config_file_option(option_name="arch", dest="pbuilder_arch")
cmd_group.add_boolean_config_file_option(option_name = "pbuilder-autoconf", dest="pbuilder_autoconf")
cmd_group.add_config_file_option(option_name="pbuilder-options", dest="pbuilder_options")
+ cmd_group.add_boolean_config_file_option(option_name="build", dest="build")
cmd_group.add_boolean_config_file_option(option_name="hooks", dest="hooks")
export_group.add_config_file_option(option_name="export-dir", dest="export_dir", type="path",
help="before building the package export the source into EXPORT_DIR, default is '%(export-dir)s'")
options, args = parser.parse_args(args)
gbp.log.setup(options.color, options.verbose, options.color_scheme)
+ if not options.build:
+ disable_builder(options)
+ dpkg_args = []
if not options.hooks:
disable_hooks(options)
if options.retag: