[Rpm-maint] [rpm-software-management/rpm] Architecture applicability check performed very late by rpm 4.20.0 (Issue #3569)
Jan Palus
notifications at github.com
Wed Feb 12 11:51:44 UTC 2025
**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/3569 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250212/436b577e/attachment.htm>
More information about the Rpm-maint
mailing list