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

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2011 Juan Romero Pardines.
* Copyright (c) 2011-2012 Juan Romero Pardines.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -205,8 +205,6 @@ xbps_end(struct xbps_handle *xh)
if (xh->cachedir_priv != NULL)
free(xh->cachedir_priv);
free(xh);
xh = NULL;
xhp = NULL;
}
@ -217,12 +215,6 @@ xbps_handle_get(void)
return xhp;
}
struct xbps_handle *
xbps_handle_alloc(void)
{
return calloc(1, sizeof(struct xbps_handle));
}
static void
common_printf(FILE *f, const char *msg, const char *fmt, va_list ap)
{