Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ymir/agents/backport_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ async def stage_changes(state):
try:
spec_path = state.local_clone / f"{state.package}.spec"
with Specfile(spec_path) as spec:
patch_files = [p.expanded_location for p in get_all_patches(spec) if p.expanded_location]
patch_files = [p.location for p in get_all_patches(spec) if p.location]

if not patch_files:
raise RuntimeError(f"Backport completed but no Patch tags found in {spec_path}")
Expand Down
2 changes: 1 addition & 1 deletion ymir/agents/mr_consolidation_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def _files_to_stage_for_patches(
"""
spec_name = f"{package}.spec"
with Specfile(local_clone / spec_name) as spec:
patch_files = [p.expanded_location for p in get_all_patches(spec) if p.expanded_location]
patch_files = [p.location for p in get_all_patches(spec) if p.location]
missing = [p for p in patch_files if not (local_clone / p).is_file()]
if missing:
raise RuntimeError(f"Spec references patch file(s) that do not exist: {missing}")
Expand Down
6 changes: 3 additions & 3 deletions ymir/tools/unprivileged/specfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ async def _run(
try:
with Specfile(spec_path) as spec:
version = spec.version
valid_patches = [p for p in get_all_patches(spec) if p.valid and p.expanded_location]
patch_files = [p.expanded_location for p in valid_patches]
number_to_filename = {p.number: p.expanded_location for p in valid_patches}
valid_patches = [p for p in get_all_patches(spec) if p.valid and p.location]
patch_files = [p.location for p in valid_patches]
number_to_filename = {p.number: p.location for p in valid_patches}
Comment thread
qodo-for-packit[bot] marked this conversation as resolved.

strip_levels = _extract_strip_levels(spec, number_to_filename)

Expand Down
Loading