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

@@ -57,9 +57,6 @@ static int
set_new_state(prop_dictionary_t dict, pkg_state_t state)
{
const struct state *stp;
#ifdef DEBUG
const char *pkgname;
#endif
assert(prop_object_type(dict) == PROP_TYPE_DICTIONARY);
@@ -73,13 +70,6 @@ set_new_state(prop_dictionary_t dict, pkg_state_t state)
if (!prop_dictionary_set_cstring_nocopy(dict, "state", stp->string))
return EINVAL;
#ifdef DEBUG
if (prop_dictionary_get_cstring_nocopy(dict, "pkgname", &pkgname)) {
xbps_dbg_printf("%s: changed pkg state to '%s'\n",
pkgname, stp->string);
}
#endif
return 0;
}