#731 `prep`: added an argument to check dependencies
Merged by onosek. Opened by onosek.
onosek/rpkg prep_nodeps  into  master

Download 731.patch

By default, prep command doesn't check dependencies. This might
lead to confusing output. When prep fails, a hint message
is displayed with information about the new argument
'--nodeps False' which makes prep potentially show missing
dependencies.

JIRA: RHELCMP-14322
Fixes: https://pagure.io/fedpkg/issue/585

Signed-off-by: Ondřej Nosek onosek@redhat.com

The original suggestion was to use rpmbuild -bd to check dependencies when prep (actually rpmbuild -bp) fails. Unfortunately, '-bd' is not present in every release where rpkg is supported. That would probably lead to checking the current rpm version in the system. The earliest version supporting '-bd' I found was rpm-4.19.0.
Also running two commands '-bp' and subsequently '-bb' would generate more output (some lines were duplicated). I didn't necessarily want to change the default behaviour of prep so there is a new suggestion:

When '-bp' fails, it shows a hint with the information about a new argument.
The next run potentially shows missing dependencies: prep --nodeps False.

The option with value True/False is quite unusual. How about renaming it to --deps or --check-deps or something like that? With no additional value. Either it is present or it is not.

rebased onto 6bb43e8d635b6ab8ac81d7736377ab3d2c0d9283

Pull-Request has been merged by onosek

So, from reading the changes, e.g. fedpkg --release=<something> prep --check-deps will actually by causing the command to run rpmbuild without the --nodeps argument that's normally inserted into the rpmbuild -bp call?

...Why not just make that the default? i.e. not insert --nodeps, since it can cause problems? it still feels a bit weird to add a new option that effectively says, "Don't mess up my prep attempt by turning off dependency checking".

Metadata