fix(autopatch): Removed two obsolete replace actions from config-portable.yaml and config.yaml whose find strings no longer match the up #2

Merged
eabdullin merged 1 commits from agent-fix/a10-20260723-001345 into a10 2026-07-23 07:32:40 +00:00
Owner

Automated fix by autopatch agent.

Summary: Removed two obsolete replace actions from config-portable.yaml and config.yaml whose find strings no longer match the upstream c10 spec.

Root cause

Two separate replace actions had become obsolete because the upstream c10 spec already includes the changes they were trying to apply:

  • config-portable.yaml: The four replace actions were adding RPM 4.19 workaround macros (jreportablearchiveForFiles, jdkportablearchiveForFiles, staticlibsportablearchiveForFiles) and updating %files sections to use them. However, java-25-openjdk-portable.specfile in c10 already defines these macros natively (as jreportablearchive_for_files(), etc.) and already uses them in the %files sections — so the find strings no longer matched. The entire replace block was removed; the changelog_entry line "Fix portable archive macros for RPM 4.19" was also removed since that fix is now upstream.

  • config.yaml: A second replace action with find: "# %patch" and count: -1 was trying to escape %patch in commented-out lines. The c10 spec no longer contains any # %patch pattern, so this action also failed at runtime. It was removed as the a10s reference branch already does not include it.

Both fixes were confirmed by comparing against the a10s reference config at /workspace/autopatch_ref/java-25-openjdk/, which had already applied the same changes. The remaining actions in both configs (portablebuilddir replace, run_script, modify_release, changelog_entry) were validated and confirmed to apply successfully.

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 '['%define staticlibsportablearchive()  %{expand:%{staticlibsportablenameimpl -- %%{1}}.tar.xz}', '%define jreportablename()     %{expand:%{jreportablenameimpl -- %%{1}}}']' in /root/autopatch-tool/src/autopatch-java-25-openjdk-u7g87nnt/rpms-namespace/java-25-openjdk/java-25-openjdk.spec

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

Automated fix by autopatch agent. **Summary:** Removed two obsolete replace actions from config-portable.yaml and config.yaml whose find strings no longer match the upstream c10 spec. ### Root cause Two separate replace actions had become obsolete because the upstream c10 spec already includes the changes they were trying to apply: - **`config-portable.yaml`**: The four `replace` actions were adding RPM 4.19 workaround macros (`jreportablearchiveForFiles`, `jdkportablearchiveForFiles`, `staticlibsportablearchiveForFiles`) and updating `%files` sections to use them. However, `java-25-openjdk-portable.specfile` in c10 already defines these macros natively (as `jreportablearchive_for_files()`, etc.) and already uses them in the `%files` sections — so the `find` strings no longer matched. The entire `replace` block was removed; the `changelog_entry` line `"Fix portable archive macros for RPM 4.19"` was also removed since that fix is now upstream. - **`config.yaml`**: A second `replace` action with `find: "# %patch"` and `count: -1` was trying to escape `%patch` in commented-out lines. The c10 spec no longer contains any `# %patch` pattern, so this action also failed at runtime. It was removed as the a10s reference branch already does not include it. Both fixes were confirmed by comparing against the a10s reference config at `/workspace/autopatch_ref/java-25-openjdk/`, which had already applied the same changes. The remaining actions in both configs (`portablebuilddir` replace, `run_script`, `modify_release`, `changelog_entry`) were validated and confirmed to apply successfully. ### 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 '['%define staticlibsportablearchive() %{expand:%{staticlibsportablenameimpl -- %%{1}}.tar.xz}', '%define jreportablename() %{expand:%{jreportablenameimpl -- %%{1}}}']' in /root/autopatch-tool/src/autopatch-java-25-openjdk-u7g87nnt/rpms-namespace/java-25-openjdk/java-25-openjdk.spec ``` --- Package: `java-25-openjdk` | Webhook branch: `c10`
eabdullin added 1 commit 2026-07-23 00:13:46 +00:00
Removed two obsolete replace actions from config-portable.yaml and config.yaml whose find strings no longer match the upstream c10 spec.
eabdullin merged commit 15050b745a into a10 2026-07-23 07:32:40 +00:00
eabdullin deleted branch agent-fix/a10-20260723-001345 2026-07-23 07:32:40 +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#2
No description provided.