@xsuchy wrote:
> What exit code rpmbuild returns when a build fails because of 
> %generate_buildrequires?

I'd say it can be non-zero, as mock doesn't necessarily have to expect a 
"specific" exit status in this case.  Yes, specific exit status would make it 
easier for mock, but I fail to see what are the expected `rpmbuild` exit 
statuses from it's manual page, unfortunately and it seems to be so far 
undefined.

> `--generate_buildrequires-to-file`

The detection whether RPM supports this option would be ugly hack in mock.  
What about to have `%dynamic_buildrequires_file` macro defined by rpm itself?  
`rpmbuild` should only make sure the file is removed before its each run.  Mock 
then can do - upon any failure:
```bash
dbf=$(rpm --eval "%dynamic_buildrequires_file")
test -n "$dbf" && test -f "$dbf" && do_the_install_logic_and_try_rpmbuild_again
```

@nim-nim 
> I’m not sure the comma separated line is a good idea, 

+1.

> How about just prefixing each missing build dependency line with a prefix you 
> can lock on?

-1.  I think that rpmbuild should assure that the shape of the output file is 
as deterministic as possible, no matter whether the packages are or are not 
already installed. I think it should be just a list of build requires without 
any prefix or so, without any header message, no warnings, etc.  As easy as 
possible.

-- 
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/pull/593#issuecomment-471881398
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to