[Rpm-maint] [rpm-software-management/rpm] RFE: ensure all %(...) system-wide macros don't pollute stderr (#424)

Pavel Raiskup notifications at github.com
Thu Mar 29 12:28:41 UTC 2018


Some RPM installed `%( shell )` macros pollute stderr (under e.g. `rpmbuild -bs`) if some of their run-time dependencies is missing, e.g.:
```
%python_sitelib %(%{__python} -Es %{_rpmconfigdir}/python-macro-helper sitelib)
%python_sitearch %(%{__python} -Es %{_rpmconfigdir}/python-macro-helper sitearch)
%python_version %(%{__python} -Es %{_rpmconfigdir}/python-macro-helper version)
```
Parsing specfile using this macros without having %__python interpreter works just fine, but stderr contains:
```
sh: /usr/bin/python: No such file or directory
sh: /usr/bin/python: No such file or directory
...
```
It's common mistake that bug reporter assumes it is bug in package which uses this macro (or e.g. bug in rpmlint); so to not confuse everybody -- IMO we should ensure that such macros don't pollute the standard error output, by some checks like:

`%(test ! -f %__python && echo unknown && exit; ...)`

Any other idea is welcome.

(Moved from https://bugzilla.redhat.com/show_bug.cgi?id=1243292)



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/424
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20180329/2c02632c/attachment.html>


More information about the Rpm-maint mailing list