pkg: pkg_verify_dependency() was calling pkg_compare_version() in reverse order
parent
91d61a76a2
commit
774ebc9716
12
pkg.c
12
pkg.c
|
@ -160,27 +160,27 @@ pkg_verify_dependency(pkg_dependency_t *pkgdep)
|
||||||
switch(pkgdep->compare)
|
switch(pkgdep->compare)
|
||||||
{
|
{
|
||||||
case PKG_LESS_THAN:
|
case PKG_LESS_THAN:
|
||||||
if (pkg_compare_version(pkgdep->version, pkg->version) < 0)
|
if (pkg_compare_version(pkg->version, pkgdep->version) < 0)
|
||||||
return pkg;
|
return pkg;
|
||||||
break;
|
break;
|
||||||
case PKG_GREATER_THAN:
|
case PKG_GREATER_THAN:
|
||||||
if (pkg_compare_version(pkgdep->version, pkg->version) > 0)
|
if (pkg_compare_version(pkg->version, pkgdep->version) > 0)
|
||||||
return pkg;
|
return pkg;
|
||||||
break;
|
break;
|
||||||
case PKG_LESS_THAN_EQUAL:
|
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;
|
return pkg;
|
||||||
break;
|
break;
|
||||||
case PKG_GREATER_THAN_EQUAL:
|
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;
|
return pkg;
|
||||||
break;
|
break;
|
||||||
case PKG_EQUAL:
|
case PKG_EQUAL:
|
||||||
if (pkg_compare_version(pkgdep->version, pkg->version) == 0)
|
if (pkg_compare_version(pkg->version, pkgdep->version) == 0)
|
||||||
return pkg;
|
return pkg;
|
||||||
break;
|
break;
|
||||||
case PKG_NOT_EQUAL:
|
case PKG_NOT_EQUAL:
|
||||||
if (pkg_compare_version(pkgdep->version, pkg->version) != 0)
|
if (pkg_compare_version(pkg->version, pkgdep->version) != 0)
|
||||||
return pkg;
|
return pkg;
|
||||||
break;
|
break;
|
||||||
case PKG_ANY:
|
case PKG_ANY:
|
||||||
|
|
Loading…
Reference in New Issue