Improved pkg best matching in rpool, and support for exact pkgver matches.

- xbps_repository_pool_find_pkg in best match case, now returns the
  newest package version available in rpool.
- Added xbps_repository_pool_find_pkg_exact that returns a package
  by exact matching a pkgver.
- Removed xbps_handle_alloc(), the user is free to use memory
  allocated from heap or stack.
- Improved API documentation in preparation for 0.12.

Bumped XBPS_API_VERSION again.
This commit is contained in:
Juan RP
2012-01-17 16:17:03 +01:00
parent da5e9f841f
commit f2b05d6438
12 changed files with 332 additions and 282 deletions

View File

@@ -266,6 +266,24 @@ xbps_find_pkg_in_dict_by_pattern(prop_dictionary_t d,
return find_pkg_in_dict(d, key, pattern, true, false);
}
prop_dictionary_t
xbps_find_pkg_in_dict_by_pkgver(prop_dictionary_t d,
const char *key,
const char *pkgver)
{
prop_array_t array;
assert(d != NULL);
assert(key != NULL);
assert(pkgver != NULL);
array = prop_dictionary_get(d, key);
if (array == NULL)
return NULL;
return xbps_find_pkg_in_array_by_pkgver(array, pkgver);
}
prop_dictionary_t HIDDEN
xbps_find_virtualpkg_in_dict_by_name(prop_dictionary_t d,
const char *key,