diff --git a/ymir/agents/backport_agent.py b/ymir/agents/backport_agent.py index 38dba287b..e0db591a6 100644 --- a/ymir/agents/backport_agent.py +++ b/ymir/agents/backport_agent.py @@ -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}") diff --git a/ymir/agents/mr_consolidation_agent.py b/ymir/agents/mr_consolidation_agent.py index ef12a4791..ac8bea75f 100644 --- a/ymir/agents/mr_consolidation_agent.py +++ b/ymir/agents/mr_consolidation_agent.py @@ -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}") diff --git a/ymir/tools/unprivileged/specfile.py b/ymir/tools/unprivileged/specfile.py index 9c7486061..2ae8d3221 100644 --- a/ymir/tools/unprivileged/specfile.py +++ b/ymir/tools/unprivileged/specfile.py @@ -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} strip_levels = _extract_strip_levels(spec, number_to_filename)