rpmlint icon indicating copy to clipboard operation
rpmlint copied to clipboard

E: buildarch-instead-of-exclusivearch-tag noarch

Open DimStar77 opened this issue 4 years ago • 5 comments

rpmlint reports an error like

E: buildarch-instead-of-exclusivearch-tag noarch
Use ExclusiveArch instead of BuildArch (or BuildArchitectures) to restrict
build on some specific architectures. Only use BuildArch with noarch

As can be identified from the error message already, the packager obviously did use noarch. So that error is a false-positive

DimStar77 avatar Sep 02 '21 13:09 DimStar77

It sounds like this error triggered with ExclusiveArch: noarch?

Conan-Kudo avatar Sep 02 '21 13:09 Conan-Kudo

unlikely:

> osc cat openSUSE:Factory libreoffice libreoffice.spec | grep -i noarch
BuildArch:      noarch
BuildArch:      noarch
BuildArch:      noarch
BuildArch:      noarch
%define _link_noarch_files() \
BuildArch:      noarch \
%{expand:%%_link_noarch_files %{pkgname}} \
# compat stuff for noarch packages
# helper script for noarch packages
# Move split noarch data to share
# create symlinks for all brandings to noarch pkg
%_link_noarch_files icon-themes

DimStar77 avatar Sep 02 '21 13:09 DimStar77

It sounds like this error triggered with ExclusiveArch: noarch?

The error says I should USE ExclusiveArch, which is not correct in the case of noarch

DimStar77 avatar Sep 02 '21 13:09 DimStar77

🤦🏾‍♂️

Conan-Kudo avatar Sep 02 '21 13:09 Conan-Kudo

Well, the full error message is: [16716s] libreoffice.spec:805: E: buildarch-instead-of-exclusivearch-tag noarch \

note the trailing \ and it comes from a huge macro:

%define make_autocorr_aliases(l:) \
...
Provides:       locale(libreoffice:%{lang}) \
BuildArch:      noarch \
%{-m:Requires: myspell-%{-m*}}%{!-m:%{-M:Requires: myspell-%{lang}}} \
...

Well, we can't probably do much, the check works on text input of the .spec file.

marxin avatar Sep 02 '21 14:09 marxin