fix(autopatch): Removed obsolete find: '# %patch' replace action that no longer matches any line in the current spec. #3

Merged
eabdullin merged 1 commits from agent-fix/a9-20260723-003935 into a9 2026-07-23 07:24:17 +00:00
Owner

Automated fix by autopatch agent.

Summary: Removed obsolete find: '# %patch' replace action that no longer matches any line in the current spec.

Root cause

The failing action was a ReplaceAction with find: "# %patch" intended to escape commented-out %patch macros to %%patch. Investigation showed:

  • The current spec has no commented-out %patch lines in any form — not with 4 spaces, not with any other spacing.
  • Active %patch directives (lines 1923, 1925, 1926) use the modern -P<N> syntax and are not commented out.
  • The # %patch pattern was present in an older version of the spec where some patches were disabled by commenting; upstream has since removed all such commented patches entirely.

This is a "dropped upstream" case (not a "moved behind an indirection" case), so the action was removed. The remaining replace action — injecting %global portablesuffix el9 under an %if 0%{?almalinux} guard — still applies cleanly and produces the intended effect.

Original error

Type: ActionNotAppliedError

Traceback (most recent call last):
  File "/root/autopatch-tool/src/webserv.py", line 89, in debrand_packages
    result = apply_modifications(
  File "/root/autopatch-tool/src/debranding.py", line 136, in apply_modifications
    config.apply_actions(rpms_working_dir + f"/{package}")
  File "/root/autopatch-tool/src/actions_handler.py", line 938, in apply_actions
    action.execute(Path(package_path))
  File "/root/autopatch-tool/src/actions_handler.py", line 475, in execute
    process_lines(
  File "/root/autopatch-tool/src/actions_handler.py", line 236, in process_lines
    raise ActionNotAppliedError(
actions_handler.ActionNotAppliedError: Action 'ReplaceAction' was not applied successfully: No changes made for '['#    %patch']' in /root/autopatch-tool/src/autopatch-java-25-openjdk-sm5t2w8k/rpms-namespace/java-25-openjdk/SPECS/java-25-openjdk.spec

Package: java-25-openjdk | Webhook branch: c9

Automated fix by autopatch agent. **Summary:** Removed obsolete `find: '# %patch'` replace action that no longer matches any line in the current spec. ### Root cause The failing action was a `ReplaceAction` with `find: "# %patch"` intended to escape commented-out `%patch` macros to `%%patch`. Investigation showed: - The current spec has **no commented-out `%patch` lines** in any form — not with 4 spaces, not with any other spacing. - Active `%patch` directives (lines 1923, 1925, 1926) use the modern `-P<N>` syntax and are not commented out. - The `# %patch` pattern was present in an older version of the spec where some patches were disabled by commenting; upstream has since removed all such commented patches entirely. This is a "dropped upstream" case (not a "moved behind an indirection" case), so the action was removed. The remaining `replace` action — injecting `%global portablesuffix el9` under an `%if 0%{?almalinux}` guard — still applies cleanly and produces the intended effect. ### Original error **Type:** `ActionNotAppliedError` ``` Traceback (most recent call last): File "/root/autopatch-tool/src/webserv.py", line 89, in debrand_packages result = apply_modifications( File "/root/autopatch-tool/src/debranding.py", line 136, in apply_modifications config.apply_actions(rpms_working_dir + f"/{package}") File "/root/autopatch-tool/src/actions_handler.py", line 938, in apply_actions action.execute(Path(package_path)) File "/root/autopatch-tool/src/actions_handler.py", line 475, in execute process_lines( File "/root/autopatch-tool/src/actions_handler.py", line 236, in process_lines raise ActionNotAppliedError( actions_handler.ActionNotAppliedError: Action 'ReplaceAction' was not applied successfully: No changes made for '['# %patch']' in /root/autopatch-tool/src/autopatch-java-25-openjdk-sm5t2w8k/rpms-namespace/java-25-openjdk/SPECS/java-25-openjdk.spec ``` --- Package: `java-25-openjdk` | Webhook branch: `c9`
eabdullin added 1 commit 2026-07-23 00:39:36 +00:00
Removed obsolete `find: '#    %patch'` replace action that no longer matches any line in the current spec.
eabdullin merged commit da6592db92 into a9 2026-07-23 07:24:17 +00:00
eabdullin deleted branch agent-fix/a9-20260723-003935 2026-07-23 07:24:17 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: autopatch/java-25-openjdk#3
No description provided.