Added support for shell (and csh as well) patterns for required

dependencies, as specified in blueprint "improved-version-matching".

It's possible now to require greater, greater or equal than,
less, less or equal than, and equal pkg versions, as well as using
'{}' and '[^!]' csh patterns in dependencies.

Code lifted from FreeBSD, thanks! :-)

Change XBPS_RELVER to 20091107 to match latest additions.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091107035620-3051wcwrirqn2g14
This commit is contained in:
Juan RP
2009-11-07 04:56:20 +01:00
parent 95b51ae72b
commit adbd3d727c
11 changed files with 280 additions and 31 deletions

View File

@ -279,11 +279,15 @@ find_repo_deps(prop_dictionary_t master, prop_dictionary_t repo,
/*
* Check if required dep is satisfied and installed.
*/
if (xbps_check_is_installed_pkg(reqpkg) >= 0)
if (xbps_check_is_installed_pkg(reqpkg))
continue;
pkgname = xbps_get_pkg_name(reqpkg);
reqvers = xbps_get_pkg_version(reqpkg);
pkgname = xbps_get_pkgdep_name(reqpkg);
reqvers = xbps_get_pkgdep_version(reqpkg);
if (pkgname == NULL || reqvers == NULL) {
rv = EINVAL;
break;
}
/*
* Check if package is already added in the
* array of unsorted deps.