[packages/rpm-build-tools] Ability to skip patches.
arekm
arekm at pld-linux.org
Wed Feb 24 16:53:57 CET 2021
commit 1cae170bdc241db73745a05f48a94b3c6164c689
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Feb 24 16:53:45 2021 +0100
Ability to skip patches.
rediff-patches.py | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/rediff-patches.py b/rediff-patches.py
index 4205528..42897f4 100755
--- a/rediff-patches.py
+++ b/rediff-patches.py
@@ -94,6 +94,7 @@ def main():
parser = parser = argparse.ArgumentParser(description='rediff patches to avoid fuzzy hunks')
parser.add_argument('spec', type=str, help='spec file name')
parser.add_argument('-p', '--patches', type=str, help='comma separated list of patch numbers to rediff')
+ parser.add_argument('-s', '--skip-patches', type=str, help='comma separated list of patch numbers to skip rediff')
parser.add_argument('-v', '--verbose', help='increase output verbosity', action='store_true')
args = parser.parse_args()
@@ -107,6 +108,9 @@ def main():
if args.patches:
args.patches = [int(x) for x in args.patches.split(',')]
+ if args.skip_patches:
+ args.skip_patches = [int(x) for x in args.skip_patches.split(',')]
+
specfile = args.spec
appsourcedir = os.path.dirname(os.path.abspath(specfile))
@@ -139,6 +143,8 @@ def main():
for patch_nr in applied_patches.keys():
if args.patches and patch_nr not in args.patches:
continue
+ if args.skip_patches and patch_nr in args.skip_patches:
+ continue
patch_name = patches[patch_nr]
logging.info("*** patch %d: %s" % (patch_nr, patch_name))
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/1cae170bdc241db73745a05f48a94b3c6164c689
More information about the pld-cvs-commit
mailing list