diff options
Diffstat (limited to 'mgagnome')
-rwxr-xr-x | mgagnome | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -631,15 +631,21 @@ class SpecFile(object): # Patch is merged if there is at least one 'ignored' line and no 'FAILED' line anywhere has_ignored = False + has_reversed = False has_failed = False for line in cmd_output: - if 'FAILED' in line or 'File to patch:' in line or 'saving rejects to file' in line: + if 'FAILED' in line or 'File to patch:' in line: has_failed = True break elif 'ignored' in line: has_ignored = True + elif 'saving rejects to file' in line: + has_failed = True + break + elif 'Reversed (or previously applied) patch detected' in line: + has_reversed = True - if has_ignored and not has_failed: + if has_ignored and has_reversed and not has_failed: # If patch was merged, drop it from spec file and rety print("INFO: Patch has been merged: %s" % failed_patch, file=sys.stdout) if failed_patch in patches: |