fix(autopatch): Removed obsolete replace actions from config-portable.yaml and config.yaml whose find targets no longer exist in the ups #1

Merged
eabdullin merged 1 commits from agent-fix/a10s-20260716-050411 into a10s 2026-07-16 07:33:58 +00:00
Owner

Automated fix by autopatch agent.

Summary: Removed obsolete replace actions from config-portable.yaml and config.yaml whose find targets no longer exist in the upstream spec.

Root cause

Two separate issues were found and fixed:

config-portable.yaml (reported error)

  • The four replace actions were added to work around an RPM 4.19 incompatibility by injecting jreportablearchiveForFiles, jdkportablearchiveForFiles, and staticlibsportablearchiveForFiles macros and updating %files references.
  • The upstream java-25-openjdk-portable.specfile (c10s branch) has already incorporated the equivalent fix directly: it now defines jreportablearchive_for_files, jdkportablearchive_for_files, and staticlibsportablearchive_for_files macros (using underscore naming), and the %files sections already reference them.
  • Because the fix now lives upstream, the find target (%define staticlibsportablearchive() … %define jreportablename()) no longer appears as a contiguous block — a new %define staticlibsportablearchive_for_files() line was inserted between them.
  • All four replace actions were removed; their intent (RPM 4.19 %%{nil} workaround) is realized in the resulting spec by the upstream definitions.
  • The now-stale changelog line "Fix portable archive macros for RPM 4.19" was also removed.

config.yaml (pre-existing failure)

  • A second replace action searched for # %patch (commented-out %patch applications with 4-space indent) to escape them as # %%patch.
  • No such commented-out lines exist anywhere in the current spec; all %patch invocations are active and uncommented.
  • The action was removed as clearly obsolete; the remaining replace action (portablebuilddir injection) and the modify_release / changelog_entry actions continue to apply correctly.

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 120, 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/rpms-namespace/java-25-openjdk/java-25-openjdk.spec

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

Automated fix by autopatch agent. **Summary:** Removed obsolete replace actions from config-portable.yaml and config.yaml whose find targets no longer exist in the upstream spec. ### Root cause Two separate issues were found and fixed: **`config-portable.yaml` (reported error)** - The four `replace` actions were added to work around an RPM 4.19 incompatibility by injecting `jreportablearchiveForFiles`, `jdkportablearchiveForFiles`, and `staticlibsportablearchiveForFiles` macros and updating `%files` references. - The upstream `java-25-openjdk-portable.specfile` (c10s branch) has already incorporated the equivalent fix directly: it now defines `jreportablearchive_for_files`, `jdkportablearchive_for_files`, and `staticlibsportablearchive_for_files` macros (using underscore naming), and the `%files` sections already reference them. - Because the fix now lives upstream, the `find` target (`%define staticlibsportablearchive() … %define jreportablename()`) no longer appears as a contiguous block — a new `%define staticlibsportablearchive_for_files()` line was inserted between them. - All four replace actions were removed; their intent (RPM 4.19 `%%{nil}` workaround) is realized in the resulting spec by the upstream definitions. - The now-stale changelog line `"Fix portable archive macros for RPM 4.19"` was also removed. **`config.yaml` (pre-existing failure)** - A second replace action searched for `# %patch` (commented-out `%patch` applications with 4-space indent) to escape them as `# %%patch`. - No such commented-out lines exist anywhere in the current spec; all `%patch` invocations are active and uncommented. - The action was removed as clearly obsolete; the remaining replace action (`portablebuilddir` injection) and the `modify_release` / `changelog_entry` actions continue to apply correctly. ### 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 120, 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/rpms-namespace/java-25-openjdk/java-25-openjdk.spec ``` --- Package: `java-25-openjdk` | Webhook branch: `c10s`
eabdullin added 1 commit 2026-07-16 05:04:12 +00:00
Removed obsolete replace actions from config-portable.yaml and config.yaml whose find targets no longer exist in the upstream spec.
eabdullin merged commit 651ab8a239 into a10s 2026-07-16 07:33:58 +00:00
eabdullin deleted branch agent-fix/a10s-20260716-050411 2026-07-16 07:33:59 +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#1
No description provided.