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:
@@ -44,12 +44,12 @@ list_deps(prop_object_t obj, void *arg, bool *loop_done)
|
||||
|
||||
assert(prop_object_type(obj) == PROP_TYPE_STRING);
|
||||
|
||||
pkgname = xbps_get_pkg_name(prop_string_cstring_nocopy(obj));
|
||||
version = xbps_get_pkg_version(prop_string_cstring_nocopy(obj));
|
||||
if (strcmp(version, "0") == 0)
|
||||
pkgname = xbps_get_pkgdep_name(prop_string_cstring_nocopy(obj));
|
||||
version = xbps_get_pkgdep_version(prop_string_cstring_nocopy(obj));
|
||||
if (strcmp(version, ">=0") == 0)
|
||||
printf("%s\n", pkgname);
|
||||
else
|
||||
printf("%s >= %s\n", pkgname, version);
|
||||
printf("%s%s\n", pkgname, version);
|
||||
|
||||
free(pkgname);
|
||||
|
||||
|
Reference in New Issue
Block a user