Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 159638 - rpmtsCheck() returns 0 (No Problems) when dependencies don't match
Summary: rpmtsCheck() returns 0 (No Problems) when dependencies don't match
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rpm
Version: 3.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2005-06-06 13:48 UTC by James Olin Oden
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-10-11 10:51:57 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description James Olin Oden 2005-06-06 13:48:23 UTC
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 12:03:45 UTC
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 10:51:57 UTC
rpmtsCheck() documentation clarified in upstream, but WONTFIX for RHEL3.

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