Red Hat Bugzilla – Bug 159638
rpmtsCheck() returns 0 (No Problems) when dependencies don't match
Last modified: 2007-11-30 17:07:07 EST
Description of problem:
In rpmts.h, rpmtsCheck() has the following doxygen:
* Check that all dependencies can be resolved.
* @param ts transaction set
* @return 0 on success
int rpmtsCheck(rpmts ts)
The part germain to this discussion is that it should return 0 on success and
I assume non-zero on failure. When I run rpmtsCheck on a transaction with
missing dependencies, though I get a problem set returned (via the transaction)
rpmtsCheck() always returns 0.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create some packages with unmet dependencies.
2. Either write enough code to create the transaction and run rpmtsCheck()
or add some debug code to rpm that printes the return value of rpmtsCheck().
3. Now this transaction through your program or the patched rpm.
rpmtsCheck() == 0
rpmtsCheck != 0
I realize this may not be a bug if you mean by success that it actually could
check dependencies. If some clarification needs to be done to the doxygen.
rpmtsCheck() returns 0 meaning that resolution was successfully
attempted for all dependencies. The result you want, that no dependencies
were unmatched, is in the problem set that is computed by rpmtsCheck().
rpmtsCheck() documentation clarified in rpm.org upstream, but WONTFIX for RHEL3.