Skip to content

Architecture applicability check performed very late by rpm 4.20.0 #3569

Open
@jpalus

Description

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
  1. rpmbuild -bb test.spec (on arch different than x86_64 ie aarch64 or with different --target)
  2. %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: fd32a43 which made checkForValidArchitectures() part of finalizeSpec() invoked through parseGeneratedSpecs() only after successful %install

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions