Bug 159638 - rpmtsCheck() returns 0 (No Problems) when dependencies don't match
rpmtsCheck() returns 0 (No Problems) when dependencies don't match
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Panu Matilainen
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2005-06-06 09:48 EDT by James Olin Oden
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-11 06:51:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description James Olin Oden 2005-06-06 09:48:23 EDT
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):

How reproducible:

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.
Actual results:
rpmtsCheck() == 0

Expected results:
rpmtsCheck != 0

Additional info:
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.
Comment 1 Jeff Johnson 2006-04-04 08:03:45 EDT
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().
Comment 2 Panu Matilainen 2007-10-11 06:51:57 EDT
rpmtsCheck() documentation clarified in rpm.org upstream, but WONTFIX for RHEL3.

Note You need to log in before you can comment on or make changes to this bug.