]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
Ability to skip patches.
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 24 Feb 2021 15:53:45 +0000 (16:53 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 24 Feb 2021 15:53:45 +0000 (16:53 +0100)
rediff-patches.py

index 42055285e493c567dfcac2344da2d983e4c2ae35..42897f41f792d92fd757cb908f00b10740bf9a96 100755 (executable)
@@ -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))
 
This page took 0.037819 seconds and 4 git commands to generate.