Hi, I have a question about capability version string comparisons. Using RPM library calls, I examine the following Centos 5 packages: package A: GConf2-devel-2.14.0-9.el5.i386.rpm package B: GConf2-2.14.0-9.el5.i386.rpm I see that one capability required by A is the following: capability name: GConf2 capability version: 2.14.0 flags: RPMSENSE_EQUAL I also see that one capability provided by B is the following: capability name: GConf2 capability version: 2.14.0-9.el5 flags: RPMSENSE_EQUAL To see if the GConf2 capability provided by B satisfies A's requirement, I call rpmvercmp() as follows: int result = rpmvercmp("2.14.0", "2.14.0-9.el5"); The return value is -1, indicating that "2.14.0-9.el5" is newer than "2.14.0". Since the "flags" value for A is RPMSENSE_EQUAL, and rpmvercmp() says that the version strings are not equal, I conclude that the GConf2 capability provided by B does not satisfy the GConf2 dependency required by A. Looking at the packages installed on my own machine, I observe the following: $ rpm -qa | grep GConf2 GConf2-2.14.0-9.el5 GConf2-devel-2.14.0-9.el5 $ $ rpm -q --provides GConf2-2.14.0-9.el5 | grep '^GConf2' GConf2 = 2.14.0-9.el5 $ $ rpm -q --requires GConf2-devel-2.14.0-9.el5 | grep '^GConf2' GConf2 = 2.14.0 $ $ rpm -q --whatprovides GConf2 GConf2-2.14.0-9.el5 $ $ rpm -V GConf2-devel-2.14.0-9.el5 $ It looks like B is the only installed package that provides the GConf2 capability, and the RPM command doesn't complain that A is missing any dependencies. What is going on here? I suspect that the capability versions "2.14.0" and "2.14.0-9.el5" should be considered equal due to some usage convention(s) that I am unaware of. Is this correct? What is the proper way to compare two capability version strings in order to determine whether a package dependency is satisfied? Is there one way that is guaranteed to work across all distros, or does it vary from one distro to another? Thanks, Dave _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list