Get rid of libfetch and proplib external dependencies.
The list of required external deps is now confuse, libarchive and openssl. libxbps now includes a wrapper for proplib prefixed with xbps_ rather than prop_.
This commit is contained in:
@ -37,8 +37,8 @@
|
||||
* @defgroup repopool Repository pool functions
|
||||
*/
|
||||
struct rpool_fpkg {
|
||||
prop_array_t revdeps;
|
||||
prop_dictionary_t pkgd;
|
||||
xbps_array_t revdeps;
|
||||
xbps_dictionary_t pkgd;
|
||||
const char *pattern;
|
||||
const char *bestpkgver;
|
||||
bool best;
|
||||
@ -78,22 +78,22 @@ static int
|
||||
find_pkg_revdeps_cb(struct xbps_repo *repo, void *arg, bool *done)
|
||||
{
|
||||
struct rpool_fpkg *rpf = arg;
|
||||
prop_array_t revdeps = NULL;
|
||||
xbps_array_t revdeps = NULL;
|
||||
const char *pkgver;
|
||||
unsigned int i;
|
||||
|
||||
(void)done;
|
||||
|
||||
revdeps = xbps_repo_get_pkg_revdeps(repo, rpf->pattern);
|
||||
if (prop_array_count(revdeps)) {
|
||||
if (xbps_array_count(revdeps)) {
|
||||
/* found */
|
||||
if (rpf->revdeps == NULL)
|
||||
rpf->revdeps = prop_array_create();
|
||||
for (i = 0; i < prop_array_count(revdeps); i++) {
|
||||
prop_array_get_cstring_nocopy(revdeps, i, &pkgver);
|
||||
prop_array_add_cstring_nocopy(rpf->revdeps, pkgver);
|
||||
rpf->revdeps = xbps_array_create();
|
||||
for (i = 0; i < xbps_array_count(revdeps); i++) {
|
||||
xbps_array_get_cstring_nocopy(revdeps, i, &pkgver);
|
||||
xbps_array_add_cstring_nocopy(rpf->revdeps, pkgver);
|
||||
}
|
||||
prop_object_release(revdeps);
|
||||
xbps_object_release(revdeps);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -102,7 +102,7 @@ static int
|
||||
find_best_pkg_cb(struct xbps_repo *repo, void *arg, bool *done)
|
||||
{
|
||||
struct rpool_fpkg *rpf = arg;
|
||||
prop_dictionary_t pkgd;
|
||||
xbps_dictionary_t pkgd;
|
||||
const char *repopkgver;
|
||||
|
||||
(void)done;
|
||||
@ -117,14 +117,14 @@ find_best_pkg_cb(struct xbps_repo *repo, void *arg, bool *done)
|
||||
"'%s'.\n", rpf->pattern, repo->uri);
|
||||
return 0;
|
||||
}
|
||||
prop_dictionary_get_cstring_nocopy(pkgd,
|
||||
xbps_dictionary_get_cstring_nocopy(pkgd,
|
||||
"pkgver", &repopkgver);
|
||||
if (rpf->bestpkgver == NULL) {
|
||||
xbps_dbg_printf(repo->xhp,
|
||||
"[rpool] Found best match '%s' (%s).\n",
|
||||
repopkgver, repo->uri);
|
||||
rpf->pkgd = pkgd;
|
||||
prop_dictionary_set_cstring_nocopy(rpf->pkgd,
|
||||
xbps_dictionary_set_cstring_nocopy(rpf->pkgd,
|
||||
"repository", repo->uri);
|
||||
rpf->bestpkgver = repopkgver;
|
||||
return 0;
|
||||
@ -138,7 +138,7 @@ find_best_pkg_cb(struct xbps_repo *repo, void *arg, bool *done)
|
||||
"[rpool] Found best match '%s' (%s).\n",
|
||||
repopkgver, repo->uri);
|
||||
rpf->pkgd = pkgd;
|
||||
prop_dictionary_set_cstring_nocopy(rpf->pkgd,
|
||||
xbps_dictionary_set_cstring_nocopy(rpf->pkgd,
|
||||
"repository", repo->uri);
|
||||
rpf->bestpkgver = repopkgver;
|
||||
}
|
||||
@ -152,7 +152,7 @@ typedef enum {
|
||||
REVDEPS_PKG
|
||||
} pkg_repo_type_t;
|
||||
|
||||
static prop_object_t
|
||||
static xbps_object_t
|
||||
repo_find_pkg(struct xbps_handle *xhp,
|
||||
const char *pkg,
|
||||
pkg_repo_type_t type)
|
||||
@ -200,7 +200,7 @@ repo_find_pkg(struct xbps_handle *xhp,
|
||||
return rpf.pkgd;
|
||||
}
|
||||
|
||||
prop_dictionary_t
|
||||
xbps_dictionary_t
|
||||
xbps_rpool_get_virtualpkg(struct xbps_handle *xhp, const char *pkg)
|
||||
{
|
||||
assert(xhp);
|
||||
@ -209,7 +209,7 @@ xbps_rpool_get_virtualpkg(struct xbps_handle *xhp, const char *pkg)
|
||||
return repo_find_pkg(xhp, pkg, VIRTUAL_PKG);
|
||||
}
|
||||
|
||||
prop_dictionary_t
|
||||
xbps_dictionary_t
|
||||
xbps_rpool_get_pkg(struct xbps_handle *xhp, const char *pkg)
|
||||
{
|
||||
assert(xhp);
|
||||
@ -221,7 +221,7 @@ xbps_rpool_get_pkg(struct xbps_handle *xhp, const char *pkg)
|
||||
return repo_find_pkg(xhp, pkg, REAL_PKG);
|
||||
}
|
||||
|
||||
prop_array_t
|
||||
xbps_array_t
|
||||
xbps_rpool_get_pkg_revdeps(struct xbps_handle *xhp, const char *pkg)
|
||||
{
|
||||
assert(xhp);
|
||||
@ -230,12 +230,12 @@ xbps_rpool_get_pkg_revdeps(struct xbps_handle *xhp, const char *pkg)
|
||||
return repo_find_pkg(xhp, pkg, REVDEPS_PKG);
|
||||
}
|
||||
|
||||
prop_dictionary_t
|
||||
xbps_dictionary_t
|
||||
xbps_rpool_get_pkg_plist(struct xbps_handle *xhp,
|
||||
const char *pkg,
|
||||
const char *plistf)
|
||||
{
|
||||
prop_dictionary_t pkgd = NULL, plistd = NULL;
|
||||
xbps_dictionary_t pkgd = NULL, plistd = NULL;
|
||||
const char *repo;
|
||||
char *url;
|
||||
|
||||
@ -261,8 +261,8 @@ xbps_rpool_get_pkg_plist(struct xbps_handle *xhp,
|
||||
}
|
||||
plistd = xbps_get_pkg_plist_from_binpkg(url, plistf);
|
||||
if (plistd) {
|
||||
prop_dictionary_get_cstring_nocopy(pkgd, "repository", &repo);
|
||||
prop_dictionary_set_cstring_nocopy(plistd, "repository", repo);
|
||||
xbps_dictionary_get_cstring_nocopy(pkgd, "repository", &repo);
|
||||
xbps_dictionary_set_cstring_nocopy(plistd, "repository", repo);
|
||||
}
|
||||
free(url);
|
||||
|
||||
|
Reference in New Issue
Block a user