pkg: pkg_verify_dependency() was calling pkg_compare_version() in reverse order

pull/1/merge
William Pitcock 2011-07-26 19:52:44 -05:00
parent 91d61a76a2
commit 774ebc9716
1 changed files with 6 additions and 6 deletions

12
pkg.c
View File

@ -160,27 +160,27 @@ pkg_verify_dependency(pkg_dependency_t *pkgdep)
switch(pkgdep->compare)
{
case PKG_LESS_THAN:
if (pkg_compare_version(pkgdep->version, pkg->version) < 0)
if (pkg_compare_version(pkg->version, pkgdep->version) < 0)
return pkg;
break;
case PKG_GREATER_THAN:
if (pkg_compare_version(pkgdep->version, pkg->version) > 0)
if (pkg_compare_version(pkg->version, pkgdep->version) > 0)
return pkg;
break;
case PKG_LESS_THAN_EQUAL:
if (pkg_compare_version(pkgdep->version, pkg->version) <= 0)
if (pkg_compare_version(pkg->version, pkgdep->version) <= 0)
return pkg;
break;
case PKG_GREATER_THAN_EQUAL:
if (pkg_compare_version(pkgdep->version, pkg->version) >= 0)
if (pkg_compare_version(pkg->version, pkgdep->version) >= 0)
return pkg;
break;
case PKG_EQUAL:
if (pkg_compare_version(pkgdep->version, pkg->version) == 0)
if (pkg_compare_version(pkg->version, pkgdep->version) == 0)
return pkg;
break;
case PKG_NOT_EQUAL:
if (pkg_compare_version(pkgdep->version, pkg->version) != 0)
if (pkg_compare_version(pkg->version, pkgdep->version) != 0)
return pkg;
break;
case PKG_ANY: