- Add x86_64_v2 to a lisf of exclusive arches if there is any arch with base x86_64

- Changelog
- Bumbed version
This commit is contained in:
Stepan Oksanichenko 2024-09-27 15:43:27 +03:00
parent b61614969d
commit 5152dfa764
Signed by: soksanichenko
GPG Key ID: AB9983172AB1E45B
2 changed files with 7 additions and 2 deletions

View File

@ -2,7 +2,7 @@
Name: pungi
Version: 4.7.0
Release: 5%{?dist}.alma
Release: 6%{?dist}.alma
Summary: Distribution compose tool
License: GPL-2.0-only
@ -174,6 +174,9 @@ rm %{buildroot}%{_bindir}/pungi
%{_bindir}/%{name}-cache-cleanup
%changelog
* Fri Sep 27 2024 Stepan Oksanichenko <soksanichenko@almalinux.org> - 4.7.0-6
- Add x86_64_v2 to a lisf of exclusive arches if there is any arch with base `x86_64`
* Mon Sep 16 2024 Eduard Abdullin <eabdullin@almalinux.org> - 4.7.0-5
- Add x86_64_v2 to arch list if x86_64 in list

View File

@ -93,7 +93,9 @@ def split_name_arch(name_arch):
def is_excluded(package, arches, logger=None):
"""Check if package is excluded from given architectures."""
if package.arch == 'x86_64_v2' and 'x86_64' in package.exclusivearch:
if any(
getBaseArch(exc_arch) == 'x86_64' for exc_arch in package.exclusivearch
) and 'x86_64_v2' not in package.exclusivearch:
package.exclusivearch.append('x86_64_v2')
if package.excludearch and set(package.excludearch) & set(arches):