fix(autopatch): Updated 4 find strings in replace actions and fixed lorax-templates-almalinux-requires.sh script to handle multiple Requ #1

Merged
eabdullin merged 2 commits from agent-fix/a10s-20260603-022652 into a10s 2026-06-03 09:08:55 +00:00
Owner

Automated fix by autopatch agent.

Summary: Updated 4 find strings in replace actions and fixed lorax-templates-almalinux-requires.sh script to handle multiple Requires: lines

Root cause

The upstream spec (v10.3) changed in multiple ways: (1) '%define templatedir' no longer includes '/80-rhel' at the end (now points to the parent templates.d/ directory), (2) the %description text changed from 'placed in %{templatedir}' to 'placed in %{templatedir}/80-rhel', (3) the %install section changed from 'cp -a 80-rhel/' to 'cp -a 80-rhel' (no trailing /) and added a new 'cp -a 70-64k' line for the new %package 64k subpackage, (4) the %files section changed from '%{templatedir}/' to '%{templatedir}/80-rhel/'. Additionally, the new %package 64k subpackage introduced a second 'Requires:' line which broke the lorax-templates-almalinux-requires.sh script (sed received a multi-line replacement string). Fixed by adding 'head -1' to the grep pipeline so only the main package's Requires is captured. The reference branch (a10) had the same outdated config — no fix available there.

Original error

Type: ActionNotAppliedError

Traceback (most recent call last):
  File "/root/autopatch-tool/src/webserv.py", line 87, 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 932, in apply_actions
    action.execute(Path(package_path))
  File "/root/autopatch-tool/src/actions_handler.py", line 472, in execute
    process_lines(
  File "/root/autopatch-tool/src/actions_handler.py", line 233, in process_lines
    raise ActionNotAppliedError(
actions_handler.ActionNotAppliedError: Action 'ReplaceAction' was not applied successfully: No changes made for '['%define templatedir %{_datadir}/lorax/templates.d/80-rhel']' in /root/autopatch-tool/src/rpms-namespace/lorax-templates-rhel/lorax-templates-rhel.spec

Package: lorax-templates-rhel | Webhook branch: c10s

Automated fix by autopatch agent. **Summary:** Updated 4 find strings in replace actions and fixed lorax-templates-almalinux-requires.sh script to handle multiple Requires: lines ### Root cause The upstream spec (v10.3) changed in multiple ways: (1) '%define templatedir' no longer includes '/80-rhel' at the end (now points to the parent templates.d/ directory), (2) the %description text changed from 'placed in %{templatedir}' to 'placed in %{templatedir}/80-rhel', (3) the %install section changed from 'cp -a 80-rhel/*' to 'cp -a 80-rhel' (no trailing /*) and added a new 'cp -a 70-64k' line for the new %package 64k subpackage, (4) the %files section changed from '%{templatedir}/*' to '%{templatedir}/80-rhel/*'. Additionally, the new %package 64k subpackage introduced a second 'Requires:' line which broke the lorax-templates-almalinux-requires.sh script (sed received a multi-line replacement string). Fixed by adding 'head -1' to the grep pipeline so only the main package's Requires is captured. The reference branch (a10) had the same outdated config — no fix available there. ### Original error **Type:** `ActionNotAppliedError` ``` Traceback (most recent call last): File "/root/autopatch-tool/src/webserv.py", line 87, 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 932, in apply_actions action.execute(Path(package_path)) File "/root/autopatch-tool/src/actions_handler.py", line 472, in execute process_lines( File "/root/autopatch-tool/src/actions_handler.py", line 233, in process_lines raise ActionNotAppliedError( actions_handler.ActionNotAppliedError: Action 'ReplaceAction' was not applied successfully: No changes made for '['%define templatedir %{_datadir}/lorax/templates.d/80-rhel']' in /root/autopatch-tool/src/rpms-namespace/lorax-templates-rhel/lorax-templates-rhel.spec ``` --- Package: `lorax-templates-rhel` | Webhook branch: `c10s`
eabdullin added 1 commit 2026-06-03 02:26:53 +00:00
Updated 4 find strings in replace actions and fixed lorax-templates-almalinux-requires.sh script to handle multiple Requires: lines
eabdullin added 1 commit 2026-06-03 08:29:55 +00:00
eabdullin merged commit e6832c858e into a10s 2026-06-03 09:08:55 +00:00
eabdullin deleted branch agent-fix/a10s-20260603-022652 2026-06-03 09:08:55 +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/lorax-templates-rhel#1
No description provided.