[Rpm-maint] [rpm-software-management/rpm] Better error for build system issues (PR #3198)
Michal Domonkos
notifications at github.com
Tue Jul 9 13:15:39 UTC 2024
This only works correctly if the first required macro on the list (the `*_conf()` variant) is defined. If it's not defined, it will still report "unknown build system", even if some other required macros is defined (e.g. the `*_build()` one):
```
$ rpmbuild --define 'buildsystem_foo_conf() %nil' -bb some.spec
error: line 8: Required parametric macro %buildsystem_foo_build not defined for buildsystem foo
$ rpmbuild --define 'buildsystem_foo_build() %nil' -bb some.spec
error: line 8: Unknown buildsystem: foo
```
IOW, the second invocation should print e.g:
```
error: line 8: Required parametric macro %buildsystem_foo_conf not defined for buildsystem foo
```
This happens because if the first required macro isn't defined (`*_conf()`), we exit the for loop immediately due to `rc` being non-zero, thus `found` remains `0`.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3198#issuecomment-2217716366
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3198/c2217716366 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240709/0da1bb6a/attachment.html>
More information about the Rpm-maint
mailing list