#export-dir = ../build-area/
# Special directory to look for pre-built orig source archives
#tarball-dir = ../tarballs/
-# Build even if uncommited local changes are present
+# Build despite of unclean repository, i.e. untracked files are present
+#ignore-untracked = True
+# Ignore all local changes (i.e. build despite of modified files)
#ignore-new = True
# Commit-ish to build
#export = HEAD
'pq-branch' : 'development/%(branch)s',
'spec-file' : 'auto',
'export-dir' : 'rpmbuild',
+ 'ignore-untracked' : 'False',
'rpmbuild-builddir' : 'BUILD',
'rpmbuild-rpmdir' : 'RPMS',
'rpmbuild-sourcedir' : 'SOURCES',
"format string for the patch-queue branch name, default is '%(pq-branch)s'",
'spec-file':
"Spec file to use, 'auto' makes gbp to guess, other values make the packaging-dir option to be ignored, default is '%(spec-file)s'",
+ 'ignore-untracked':
+ "build with untracked files in the source tree, default is '%(ignore-untracked)s'",
'patch-export':
"Create patches between upstream and export-treeish, default is '%(patch-export)s'",
'pristine-tarball-name':
parser.add_option_group(cmd_group)
parser.add_option_group(export_group)
+ parser.add_boolean_config_file_option(option_name = "ignore-untracked", dest="ignore_untracked")
parser.add_boolean_config_file_option(option_name = "ignore-new", dest="ignore_new")
parser.add_option("--git-verbose", action="store_true", dest="verbose", default=False,
help="verbose command execution")
if not options.export_only:
Command(options.cleaner, shell=True)()
if not options.ignore_new:
- (ret, out) = repo.is_clean()
+ (ret, out) = repo.is_clean(options.ignore_untracked)
if not ret:
gbp.log.err("You have uncommitted changes in your source tree:")
gbp.log.err(out)
- raise GbpError, "Use --git-ignore-new to ignore."
+ raise GbpError, "Use --git-ignore-new or --git-ignore-untracked to ignore."
if not options.ignore_new and not options.ignore_branch:
if branch != options.packaging_branch: