[Rpm-maint] [rpm-software-management/rpm] Print binaries when found in noarch package (PR #4060)

Panu Matilainen notifications at github.com
Wed Dec 3 08:20:46 UTC 2025


@pmatilai commented on this pull request.



> +	    rpmlog(RPMLOG_WARNING,
+		   _("Binaries arch (%d) not matching the package arch (%d).\n"),
+		   header_color, arch_color);
+	}
+    } else if (header_color != 0) {
+	int terminate = rpmExpandNumeric("%{?_binaries_in_noarch_packages_terminate_build}");
+	string files;
+	for (unsigned ix = 0; ix < fc->nfiles; ix++) {
+	    if (fc->fcolor[ix] == 0)
+		continue;
+	    string f = fc->fn[ix].substr(fc->buildRoot.size());
+	    files += string(4, ' ') + f + '\n';
+	}
+	rpmlog(terminate ? RPMLOG_ERR : RPMLOG_WARNING, 
+	       _("Arch dependent binaries in noarch package:\n%s"),
+	       files.c_str());

Hmm. Traditionally I think we've just done multiple rpmlog() calls in situations like this, which avoids the trouble of having to pre-formatting the string but then you get all those lines with a warning/error prefix. So we got

```
error: Arch dependent binaries in noarch package:
error:    /usr/local/bin/hello
error:    /usr/local/bin/hello2
```

vs

```
error: Arch dependent binaries in noarch package:
    /usr/local/bin/hello
    /usr/local/bin/hello2
```

I originally intended to say the filenames prefixed with error/warning doesn't look horrible (to me), but seeing these side by side, it actually does :laughing: You've obviously pondered this already, this is just me talking myself through it. Feel free to ignore this particular blahblah :sweat_smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/4060#pullrequestreview-3533731172
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/4060/review/3533731172 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20251203/956bb9fb/attachment.htm>


More information about the Rpm-maint mailing list