fix(autopatch): Updated action 3's find/replace strings in patch-git.lua to match the refactored git log command that now uses a `git_lo #3

Merged
eabdullin merged 1 commits from agent-fix/a10s-20260811-100152 into a10s 2026-08-11 10:16:53 +00:00
Owner

Automated fix by autopatch agent.

Summary: Updated action 3's find/replace strings in patch-git.lua to match the refactored git log command that now uses a git_log_format_options variable.

Root cause

The upstream patch-git.lua was refactored between the working version and the current c10s branch:

  • The old code had the git log options inline as a literal string:
    'log --first-parent --no-decorate --no-renames --raw --pretty=fuller'
    .. ' --date=default > ' .. git_log_file)
    
  • The new code extracts the format flags into a module-level variable:
    local git_log_format_options =
       '--first-parent --no-decorate --no-renames --pretty=fuller --date=default'
    
    and calls it as:
    check_git(
       'log --raw ' .. git_log_format_options
       .. ' > ' .. git_log_file)
    
  • Action 3's find targeted the old literal string, which no longer exists in the file, causing ActionNotAppliedError.

The fix updates action 3's find to target the new two-line pattern ('log --raw ' .. git_log_format_options / .. ' > ' .. git_log_file)) and the replace to insert log_branch in the same position as before (.. ' ' .. log_branch .. ' > ' .. git_log_file)), preserving the original intent of restricting the git log to the upstream branch ref.

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 138, 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 '["'log --first-parent --no-decorate --no-renames --raw --pretty=fuller'", ".. ' --date=default > ' .. git_log_file)"]' in /root/autopatch-tool/src/autopatch-glibc-4xmf2n1n/rpms-namespace/glibc/patch-git.lua

Package: glibc | Webhook branch: c10s

Automated fix by autopatch agent. **Summary:** Updated action 3's find/replace strings in patch-git.lua to match the refactored git log command that now uses a `git_log_format_options` variable. ### Root cause The upstream `patch-git.lua` was refactored between the working version and the current `c10s` branch: - The old code had the git log options inline as a literal string: ``` 'log --first-parent --no-decorate --no-renames --raw --pretty=fuller' .. ' --date=default > ' .. git_log_file) ``` - The new code extracts the format flags into a module-level variable: ```lua local git_log_format_options = '--first-parent --no-decorate --no-renames --pretty=fuller --date=default' ``` and calls it as: ```lua check_git( 'log --raw ' .. git_log_format_options .. ' > ' .. git_log_file) ``` - Action 3's `find` targeted the old literal string, which no longer exists in the file, causing `ActionNotAppliedError`. The fix updates action 3's `find` to target the new two-line pattern (`'log --raw ' .. git_log_format_options` / `.. ' > ' .. git_log_file)`) and the `replace` to insert `log_branch` in the same position as before (`.. ' ' .. log_branch .. ' > ' .. git_log_file)`), preserving the original intent of restricting the git log to the upstream branch ref. ### 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 138, 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 '["'log --first-parent --no-decorate --no-renames --raw --pretty=fuller'", ".. ' --date=default > ' .. git_log_file)"]' in /root/autopatch-tool/src/autopatch-glibc-4xmf2n1n/rpms-namespace/glibc/patch-git.lua ``` --- Package: `glibc` | Webhook branch: `c10s`
eabdullin added 1 commit 2026-08-11 10:01:53 +00:00
Updated action 3's find/replace strings in patch-git.lua to match the refactored git log command that now uses a `git_log_format_options` variable.
eabdullin merged commit 5057f8a76e into a10s 2026-08-11 10:16:53 +00:00
eabdullin deleted branch agent-fix/a10s-20260811-100152 2026-08-11 10:16:54 +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/glibc#3
No description provided.