diff options
author | sobomax <sobomax@FreeBSD.org> | 2002-01-04 22:50:57 +0800 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2002-01-04 22:50:57 +0800 |
commit | 3a1a5c90e987b2b8928fb575ec08627d4af01b41 (patch) | |
tree | 52231ce8eacc62f47f1c2d2c4f264a8785a0adb7 /Tools | |
parent | a9b8976aba8589c52ee0e19d1f0b7598d6521240 (diff) | |
download | freebsd-ports-gnome-3a1a5c90e987b2b8928fb575ec08627d4af01b41.tar.gz freebsd-ports-gnome-3a1a5c90e987b2b8928fb575ec08627d4af01b41.tar.zst freebsd-ports-gnome-3a1a5c90e987b2b8928fb575ec08627d4af01b41.zip |
Ignore patchfiles ending with `.orig' and `.rej'.
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/patchtool.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Tools/scripts/patchtool.py b/Tools/scripts/patchtool.py index d66f6b2874ab..b830f5c74c81 100755 --- a/Tools/scripts/patchtool.py +++ b/Tools/scripts/patchtool.py @@ -37,6 +37,7 @@ class Vars: DIFF_ARGS = '-du' DIFF_SUFX = '.orig' PATCH_PREFIX = 'patch-' + PATCH_IGN_SUFX = ('.orig', '.rej') RCSDIFF_SUFX = ',v' CD_CMD = 'cd' @@ -433,7 +434,12 @@ class PatchesCollection: # Not reached # for file in glob.glob(os.path.join(patchdir, Vars.PATCH_PREFIX + '*')): - self.addpatchfile(file, wrksrc) + for sufx in Vars.PATCH_IGN_SUFX: + if file[-len(sufx):] == sufx: + write_msg('WARNING: patchfile "%s" ignored\n' % file) + break + else: + self.addpatchfile(file, wrksrc) def addpatchfile(self, path, wrksrc): path = os.path.abspath(path) |