Ticket #33 (new enhancement)

Opened 3 years ago

RFE: specfile-usable variable for whether noarch subpackages are supported

Reported by: scop Assigned to: pmatilai
Priority: major Milestone:
Component: rpm Version: RPM Development
Keywords: Cc:

Description

Being able to do something like this in specfiles would be useful:

%package foo
[...]
%if 0%{?_rpm_feature_noarch_subpackages}
BuildArch: noarch
%endif

This is in order to avoid issues when an arch specific package with noarch subpackages is built with rpmbuild versions that don't support it - the build may succeed but all packages (main and all subpackages) end up noarch.

Perhaps rpm could start defining new features like this as built in, non-user-overridable/definable _rpm_feature_* or something macros?

See https://www.redhat.com/archives/fedora-devel-list/2009-February/msg01023.html