Ignore patchfiles ending with .orig' and .rej'.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user