[Rpm-maint] [rpm-software-management/rpm] When some of the mandatory %buildsystem_* macros is undefined, the error is confusing (Issue #3190)
Miro Hrončok
notifications at github.com
Tue Jul 2 21:22:35 UTC 2024
**Describe the bug**
https://github.com/rpm-software-management/rpm/blob/775acf13850373c16d4b0d02a1970339c381f19b/build/parseSpec.c#L965-L971
Currently, all of `%buildsystem_name_conf`, `%buildsystem_name_build`, and `%buildsystem_name_install` need to be defined for the buildsystem to function.
This matches the [documentation](https://rpm-software-management.github.io/rpm/manual/buildsystem.html) which says those are mandatory.
When one of the macros is missing, I get:
```
error: line X: Unknown buildsystem: name
```
This is a confusing error. I would pretty much prefer to see something like:
```
error: line X: Misconfigured buildsystem: name (required parametric macro %buildsystem_name_conf not defined)
```
**To Reproduce**
1. Define `%buildsystem_foo_build` and `%buildsystem_foo_install`, omit `%buildsystem_foo_conf`
2. Try building a package with `BuildSystem: foo`
3. Error encountered: `Unknown buildsystem: foo`
Alternatively:
1. Don't define anything
2. Try building a package with `BuildSystem: foo`
3. Error encountered: `Unknown buildsystem: foo`
**Expected behavior**
The buildsystem is known, just badly defined. This should be a different error message.
**Environment**
- OS / Distribution: Fedora 41
- Version rpm-4.19.92-1.fc41
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3190
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/3190 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240702/379ef663/attachment.html>
More information about the Rpm-maint
mailing list