**Describe the bug**
Architecture applicability check is not performed early in the process by
`rpmbuild` but very late after successful `%install`.
**To Reproduce**
Steps to reproduce the behavior:
1. Sample spec file:
```
Summary: test
Name: test
Version: 1
Release: 1
License: GPL
Group: Applications/System
ExclusiveArch: x86_64
%description
test
%prep
echo prep
%build
echo build
%install
echo install
%clean
rm -rf $RPM_BUILD_ROOT
```
2. `rpmbuild -bb test.spec` (on arch different than `x86_64` ie `aarch64` or
with different `--target`)
3. `%mkbuilddir`, `%prep`, `%build` and `%install` are all executed and only
then `error: Architecture is not included: aarch64` appears
**Expected behavior**
`rpmbuild` fails with `error: Architecture is not included: aarch64` before
even `%mkbuilddir` is executed.
**Environment**
- OS / Distribution: PLD Linux 3.0
- Version rpm 4.20.0
**Additional context**
Appears to be caused by this change:
https://github.com/rpm-software-management/rpm/commit/fd32a43e04814bd1f298977306ac1bcdc6c790d2
which made `checkForValidArchitectures()` part of `finalizeSpec()` invoked
through `parseGeneratedSpecs()` [only after successful
`%install`](https://github.com/rpm-software-management/rpm/blob/e1eb24680d9f4f49a5fe23f8db617ddacf08bff4/build/build.cc#L497)
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3569
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/3...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint