From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.14-14 i686)
Description of problem:
Description of a situation(just for example): package first-1.0-1.i386.rpm
requires lib.so.1, package second-1.0-1.i386.rpm provides lib.so.1.
When I retreive tag RPMTAG_REQUIREVERSION or RPMTAG_PROVIDEVERSION from the
headers of those packages the result I get is equal to "". When the
function rpmdepCheck() is called which must find out that package
second-1.0-1.i386.rpm is needed for package first-1.0-1.i386.rpm, it
finally gets into function rangeMatchesDepFlags(). This function has
if (!(reqFlags & RPMSENSE_SENSEMASK) || !reqEVR || !strlen(reqEVR))
As require version is equal to "", strlen(reqEVR) == 0, function returns
1, what means that dependency for package is satisfied by rpm-database what
is not true.
Steps to Reproduce:
1.Create two packages, one of which requires that, what another provides
3.Write a program which uses rpmdepCheck()
Yup, this is exactly the way it's supposed to work.
Originally, rpm had not versions on Provides: and versions were
optional on Requires:. This is reflected in the code by the tests
for both a NULL pointer (i.e. tag is missing), as well as for the empty
string "" (i.e. no value for this element).
The semantics in that case is to interpret as Provides" all versions,
and or Requires: any version. The return of 1 is exactly correct, since
rangeMatchesDepFlags() is never called unless the name was in the database,
and the existince of the name is exactly the same as Provides: all versions or
Requires: any version.