'rpmbuild-srpmdir' : 'SRPMS',
'rpmbuild-buildrootdir' : 'BUILDROOT',
'patch-export' : 'False',
+ 'patch-export-ignore-path' : '',
'patch-export-compress' : '0',
'patch-export-squash-until' : '',
'pristine-tarball-name' : 'auto',
"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'",
+ 'patch-export-ignore-path':
+ ("Exclude changes to path(s) matching regex, default "
+ "is '%(patch-export-ignore-path)s'"),
'patch-export-compress':
"Compress (auto-generated) patches larger than given number of bytes, 0 never compresses, default is '%(patch-export-compress)s'",
'patch-export-squash-until':
export_group.add_option("--git-export-only", action="store_true", dest="export_only", default=False,
help="only export packaging files, don't build")
export_group.add_boolean_config_file_option("patch-export", dest="patch_export")
+ export_group.add_config_file_option("patch-export-ignore-path",
+ dest="patch_export_ignore_path")
export_group.add_config_file_option("patch-export-compress", dest="patch_export_compress")
export_group.add_config_file_option("patch-export-squash-until", dest="patch_export_squash_until")
export_group.add_boolean_config_file_option(option_name="patch-numbers", dest="patch_numbers")
gbp.log.info("Squashing commits %s..%s into one monolithic diff" %
(start_sha1, squash_sha1))
patch_fn = format_diff(outdir, squash[1], repo,
- start_sha1, squash_sha1)
+ start_sha1, squash_sha1,
+ options.patch_export_ignore_path)
if patch_fn:
patches.append(patch_fn)
start = squash_sha1
cmds = parse_gbp_commands(info, 'gbp-rpm', ('ignore'), None)
if not 'ignore' in cmds:
patch_fn = format_patch(outdir, repo, info, patches,
- options.patch_numbers)
+ options.patch_numbers,
+ options.patch_export_ignore_path)
if patch_fn:
commands[os.path.basename(patch_fn)] = cmds
else:
# Generate diff to the tree-ish object
if end_commit != end:
gbp.log.info("Generating diff file %s..%s" % (end_commit, end))
- patch_fn = format_diff(outdir, None, repo, end_commit, end)
+ patch_fn = format_diff(outdir, None, repo, end_commit, end,
+ options.patch_export_ignore_path)
if patch_fn:
patches.append(patch_fn)
parser.add_config_file_option("patch-export-compress",
dest="patch_export_compress")
parser.add_config_file_option("patch-export-squash-until", dest="patch_export_squash_until")
+ parser.add_config_file_option("patch-export-ignore-path", dest="patch_export_ignore_path")
(options, args) = parser.parse_args(argv)
gbp.log.setup(options.color, options.verbose)