diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2012-11-08 12:27:43 +0200 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2013-03-08 13:13:38 +0200 |
commit | 55b91fae20c2930e35d397c1cd11decba6e6dbbf (patch) | |
tree | 1ee59ae7d8758aa506686de22b8cf2c2a361caba /gbp | |
parent | 2cbcceb97be0f6db599e7002014dc903913a4851 (diff) | |
download | git-buildpackage-55b91fae20c2930e35d397c1cd11decba6e6dbbf.tar.gz git-buildpackage-55b91fae20c2930e35d397c1cd11decba6e6dbbf.tar.bz2 git-buildpackage-55b91fae20c2930e35d397c1cd11decba6e6dbbf.zip |
buildpackage-rpm: fail patch-export if local patches found
Make patch export fail if local patch files (not marked for manual
maintenance) exist.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp')
-rwxr-xr-x | gbp/scripts/buildpackage_rpm.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gbp/scripts/buildpackage_rpm.py b/gbp/scripts/buildpackage_rpm.py index 1f6da3d8..1de08370 100755 --- a/gbp/scripts/buildpackage_rpm.py +++ b/gbp/scripts/buildpackage_rpm.py @@ -222,6 +222,15 @@ def export_patches(repo, spec, export_treeish, options): """ Generate patches and update spec file """ + # Fail if we have local patch files not marked for manual maintenance. + # Ignore patches listed in spec but not found in packaging dir + for patch in spec.patchseries(): + if os.path.exists(patch.path): + raise GbpAutoGenerateError( + 'Patches not marked for manual maintenance found, ' + 'refusing to overwrite! Fix by applying them to packaging ' + 'branch and removing the files.') + try: upstream_tree = get_upstream_tree(repo, spec, options) update_patch_series(repo, spec, upstream_tree, export_treeish, options) |