File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -1649,18 +1649,19 @@ static rpmRC rpmfcCheckPackageColor(rpmfc fc)
16491649 unsigned ix;
16501650 int header_color = headerGetNumber (pkg->header , RPMTAG_HEADERCOLOR);
16511651 int arch_color = rpmGetArchColor (a);
1652+ bool is_noarch = rstreq (a, " noarch" );
16521653 bool terminate = false ;
16531654
1654- if (!rstreq (a, " noarch" )) {
1655- if (arch_color > 0 && header_color > 0 &&
1656- !(arch_color & header_color)) {
1657- msg = " Binaries not matching package arch (%s):\n %s" ;
1658- } else {
1655+ /* Return early if no outlier binaries are present */
1656+ if (is_noarch) {
1657+ if (!header_color)
16591658 return RPMRC_OK;
1660- }
1661- } else if (header_color != 0 ) {
16621659 terminate = rpmExpandNumeric (" %{?_binaries_in_noarch_packages_terminate_build}" );
16631660 msg = " Arch dependent binaries in noarch package (%s):\n %s" ;
1661+ } else if (arch_color <= 0 || header_color <= 0 ) {
1662+ return RPMRC_OK;
1663+ } else if (!(arch_color & header_color)) {
1664+ msg = " Binaries not matching package arch (%s):\n %s" ;
16641665 } else {
16651666 return RPMRC_OK;
16661667 }
You can’t perform that action at this time.
0 commit comments