question about rpmdsCompare()

David Peterson petersod at us.ibm.com
Mon Feb 21 19:12:18 UTC 2011


I have some code that uses rpmdsCompare as follows:

    rpmds x, y, z;

    // code that initializes x, y, and z goes here

    int result0 = rpmdsCompare(x, z);
    int result1 = rpmdsCompare(y, z);

Adding printf() calls immediately before the calls to rpmdsCompare()
shows that x, y, and z contain the following information:

    contents of x
    -------------
    type:                  Provides
    name:                  kernel
    epoch/version/release: 2.6.18
    flags:                 0x08

    contents of y
    -------------
    type:                  Provides
    name:                  kernel
    epoch/version/release: 2.6.18-164.el5
    flags:                 0x08

    contents of z
    -------------
    type:                  Requires
    name:                  kernel
    epoch/version/release: 2.6.18-238.1.1.0.1.el5
    flags:                 0x08

result0 gets a value of 1, indicating a match.  result1 gets a
value of 0, indicating no match.  Is this the expected behavior?  I
would have expected a result of "no match" in both cases since
neither x nor y has an epoch/version/release value that matches z
exactly.

Thanks,
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20110221/93ab6d50/attachment.html>


More information about the Rpm-list mailing list