libxbps: rename xbps_repository_pool_xxx to xbps_rpool_xxx.

This commit is contained in:
Juan RP
2012-05-30 10:56:32 +02:00
parent da4b8b7427
commit 922ee1f1b6
11 changed files with 47 additions and 54 deletions

View File

@@ -218,7 +218,7 @@ xbps_end(void)
return;
xbps_pkgdb_release(xhp);
xbps_repository_pool_release(xhp);
xbps_rpool_release(xhp);
xbps_fetch_unset_cache_connection();
if (xhp->cfg != NULL)

View File

@@ -386,9 +386,9 @@ find_repo_deps(prop_dictionary_t transd, /* transaction dictionary */
* If dependency does not match add pkg into the missing
* deps array and pass to next one.
*/
if (((curpkgd = xbps_repository_pool_find_virtualpkg_conf(reqpkg, true)) == NULL) &&
((curpkgd = xbps_repository_pool_find_pkg(reqpkg, true, true)) == NULL) &&
((curpkgd = xbps_repository_pool_find_virtualpkg(reqpkg, true)) == NULL)) {
if (((curpkgd = xbps_rpool_find_virtualpkg_conf(reqpkg, true)) == NULL) &&
((curpkgd = xbps_rpool_find_pkg(reqpkg, true, true)) == NULL) &&
((curpkgd = xbps_rpool_find_virtualpkg(reqpkg, true)) == NULL)) {
/* pkg not found, there was some error */
if (errno && errno != ENOENT) {
xbps_dbg_printf("failed to find pkg "

View File

@@ -63,7 +63,7 @@ check_repo_arch(const char *uri)
}
int HIDDEN
xbps_repository_pool_init(struct xbps_handle *xhp)
xbps_rpool_init(struct xbps_handle *xhp)
{
prop_dictionary_t d = NULL;
prop_array_t array;
@@ -146,14 +146,14 @@ xbps_repository_pool_init(struct xbps_handle *xhp)
xbps_dbg_printf("[rpool] initialized ok.\n");
out:
if (rv != 0)
xbps_repository_pool_release(xhp);
xbps_rpool_release(xhp);
return rv;
}
void HIDDEN
xbps_repository_pool_release(struct xbps_handle *xhp)
xbps_rpool_release(struct xbps_handle *xhp)
{
prop_array_t idx;
prop_dictionary_t d;
@@ -176,7 +176,7 @@ xbps_repository_pool_release(struct xbps_handle *xhp)
}
int
xbps_repository_pool_sync(void)
xbps_rpool_sync(void)
{
const struct xbps_handle *xhp = xbps_handle_get();
const char *repouri;
@@ -222,9 +222,8 @@ xbps_repository_pool_sync(void)
}
int
xbps_repository_pool_foreach(
int (*fn)(struct repository_pool_index *, void *, bool *),
void *arg)
xbps_rpool_foreach(int (*fn)(struct repository_pool_index *, void *, bool *),
void *arg)
{
prop_dictionary_t d;
struct xbps_handle *xhp = xbps_handle_get();
@@ -235,7 +234,7 @@ xbps_repository_pool_foreach(
assert(fn != NULL);
/* Initialize repository pool */
if ((rv = xbps_repository_pool_init(xhp)) != 0) {
if ((rv = xbps_rpool_init(xhp)) != 0) {
if (rv == ENOTSUP) {
xbps_dbg_printf("[rpool] empty repository list.\n");
} else if (rv != ENOENT && rv != ENOTSUP) {

View File

@@ -215,31 +215,31 @@ repo_find_pkg(const char *pkg, bool bypattern, pkg_repo_type_t type)
* Find exact pkg version.
*/
rpf->exact = true;
rv = xbps_repository_pool_foreach(repo_find_pkg_cb, rpf);
rv = xbps_rpool_foreach(repo_find_pkg_cb, rpf);
break;
case BEST_PKG:
/*
* Find best pkg version.
*/
rv = xbps_repository_pool_foreach(repo_find_best_pkg_cb, rpf);
rv = xbps_rpool_foreach(repo_find_best_pkg_cb, rpf);
break;
case VIRTUAL_PKG:
/*
* Find virtual pkg.
*/
rv = xbps_repository_pool_foreach(repo_find_virtualpkg_cb, rpf);
rv = xbps_rpool_foreach(repo_find_virtualpkg_cb, rpf);
break;
case VIRTUAL_CONF_PKG:
/*
* Find virtual pkg as specified in configuration file.
*/
rv = xbps_repository_pool_foreach(repo_find_virtualpkg_conf_cb, rpf);
rv = xbps_rpool_foreach(repo_find_virtualpkg_conf_cb, rpf);
break;
case REAL_PKG:
/*
* Find real pkg.
*/
rv = xbps_repository_pool_foreach(repo_find_pkg_cb, rpf);
rv = xbps_rpool_foreach(repo_find_pkg_cb, rpf);
break;
}
if (rv != 0)
@@ -249,7 +249,7 @@ repo_find_pkg(const char *pkg, bool bypattern, pkg_repo_type_t type)
}
prop_dictionary_t
xbps_repository_pool_find_virtualpkg(const char *pkg, bool bypattern)
xbps_rpool_find_virtualpkg(const char *pkg, bool bypattern)
{
struct repo_pool_fpkg *rpf;
prop_dictionary_t pkgd = NULL;
@@ -265,7 +265,7 @@ xbps_repository_pool_find_virtualpkg(const char *pkg, bool bypattern)
}
prop_dictionary_t
xbps_repository_pool_find_virtualpkg_conf(const char *pkg, bool bypattern)
xbps_rpool_find_virtualpkg_conf(const char *pkg, bool bypattern)
{
struct repo_pool_fpkg *rpf;
prop_dictionary_t pkgd = NULL;
@@ -281,7 +281,7 @@ xbps_repository_pool_find_virtualpkg_conf(const char *pkg, bool bypattern)
}
prop_dictionary_t
xbps_repository_pool_find_pkg(const char *pkg, bool bypattern, bool best)
xbps_rpool_find_pkg(const char *pkg, bool bypattern, bool best)
{
struct repo_pool_fpkg *rpf;
prop_dictionary_t pkgd = NULL;
@@ -301,7 +301,7 @@ xbps_repository_pool_find_pkg(const char *pkg, bool bypattern, bool best)
}
prop_dictionary_t
xbps_repository_pool_find_pkg_exact(const char *pkgver)
xbps_rpool_find_pkg_exact(const char *pkgver)
{
struct repo_pool_fpkg *rpf;
prop_dictionary_t pkgd = NULL;
@@ -317,8 +317,7 @@ xbps_repository_pool_find_pkg_exact(const char *pkgver)
}
prop_dictionary_t
xbps_repository_pool_dictionary_metadata_plist(const char *pattern,
const char *plistf)
xbps_rpool_dictionary_metadata_plist(const char *pattern, const char *plistf)
{
prop_dictionary_t pkgd = NULL, plistd = NULL;
const char *repoloc;
@@ -336,9 +335,9 @@ xbps_repository_pool_dictionary_metadata_plist(const char *pattern,
* libfetch!
*/
if (xbps_pkgpattern_version(pattern))
pkgd = xbps_repository_pool_find_pkg(pattern, true, false);
pkgd = xbps_rpool_find_pkg(pattern, true, false);
else
pkgd = xbps_repository_pool_find_pkg(pattern, false, true);
pkgd = xbps_rpool_find_pkg(pattern, false, true);
if (pkgd == NULL)
goto out;

View File

@@ -84,9 +84,9 @@ transaction_find_pkg(const char *pkg, bool bypattern, bool bestpkg, int action)
/*
* Find out if the pkg has been found in repository pool.
*/
if (((pkg_repod = xbps_repository_pool_find_virtualpkg_conf(pkg, bypattern)) == NULL) &&
((pkg_repod = xbps_repository_pool_find_pkg(pkg, bypattern, bestpkg)) == NULL) &&
((pkg_repod = xbps_repository_pool_find_virtualpkg(pkg, bypattern)) == NULL)) {
if (((pkg_repod = xbps_rpool_find_virtualpkg_conf(pkg, bypattern)) == NULL) &&
((pkg_repod = xbps_rpool_find_pkg(pkg, bypattern, bestpkg)) == NULL) &&
((pkg_repod = xbps_rpool_find_virtualpkg(pkg, bypattern)) == NULL)) {
/* not found */
rv = errno;
errno = 0;