Bug ID | 1013275 |
---|---|
Summary | rpmbuild does not stop on %error |
Classification | openSUSE |
Product | openSUSE Distribution |
Version | Leap 42.3 |
Hardware | Other |
OS | Other |
Status | NEW |
Severity | Normal |
Priority | P5 - None |
Component | Development |
Assignee | bnc-team-screening@forge.provo.novell.com |
Reporter | jmatejek@suse.com |
QA Contact | qa-bugs@suse.de |
Found By | --- |
Blocker | --- |
When building a package that contains the %error macro, rpmbuild will print the error but continue the build. This makes it impossible to deliberately fail build, unless this is in %prep/%build/%install, where one can put "exit 1" after the %error declaration. The docs say: %{error:...} print ... to stderr and return BADSPEC i don't know exactly what "return BADSPEC" means, but it is definitely not doing what I expect to reproduce: take a working spec file and put %{error:hello world} somewhere in it expected result: rpmbuild fails, printing "Error: hello world" actual result: rpmbuild prints "Error: hello world" but the build finishes successfully