From 94bb169c8891d9fe1caf10a900c143bd4b952600 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 30 Nov 2009 12:35:38 +0100 Subject: [PATCH] Rename lib/repository_plist.c exported functions. xbps_get_path_from_pkg_dict_repo -> xbps_repository_get_path_from_pkg_dict xbps_get_pkg_plist_dict_from_repo -> xbps_repository_get_pkg_plist_dict xbps_get_pkg_plist_dict_from_url -> xbps_repository_get_pkg_plist_dict_from_url --HG-- extra : convert_revision : xtraeme%40gmail.com-20091130113538-bji65cydf3bkwxkw --- bin/xbps-bin/install.c | 2 +- bin/xbps-repo/index.c | 3 ++- bin/xbps-repo/main.c | 2 +- bin/xbps-repo/repository.c | 13 +++++++------ include/xbps_api.h | 8 ++++---- lib/repository_plist.c | 12 +++++++----- 6 files changed, 22 insertions(+), 18 deletions(-) diff --git a/bin/xbps-bin/install.c b/bin/xbps-bin/install.c index b45d0f74..0b87301c 100644 --- a/bin/xbps-bin/install.c +++ b/bin/xbps-bin/install.c @@ -157,7 +157,7 @@ download_package_list(prop_object_iterator_t iter) free(lbinfile); return errno; } - binfile = xbps_get_path_from_pkg_dict_repo(obj, repoloc); + binfile = xbps_repository_get_path_from_pkg_dict(obj, repoloc); if (binfile == NULL) { free(lbinfile); return errno; diff --git a/bin/xbps-repo/index.c b/bin/xbps-repo/index.c index d28081ea..71bf8900 100644 --- a/bin/xbps-repo/index.c +++ b/bin/xbps-repo/index.c @@ -106,7 +106,8 @@ xbps_repo_addpkg_index(prop_dictionary_t idxdict, const char *filedir, goto out; } - newpkgd = xbps_get_pkg_plist_dict_from_url(file, XBPS_PKGPROPS); + newpkgd = xbps_repository_get_pkg_plist_dict_from_url(file, + XBPS_PKGPROPS); if (newpkgd == NULL) { printf("%s: can't read %s metadata file, skipping!\n", file, XBPS_PKGPROPS); diff --git a/bin/xbps-repo/main.c b/bin/xbps-repo/main.c index a40d0ab5..c5fa3ec5 100644 --- a/bin/xbps-repo/main.c +++ b/bin/xbps-repo/main.c @@ -176,7 +176,7 @@ main(int argc, char **argv) if (argc != 2) usage(); - pkgd = xbps_get_pkg_plist_dict_from_repo(argv[1], + pkgd = xbps_repository_get_pkg_plist_dict(argv[1], XBPS_PKGFILES); if (pkgd == NULL) { printf("E: couldn't read %s: %s.\n", XBPS_PKGFILES, diff --git a/bin/xbps-repo/repository.c b/bin/xbps-repo/repository.c index 815c47cc..aa00a184 100644 --- a/bin/xbps-repo/repository.c +++ b/bin/xbps-repo/repository.c @@ -198,13 +198,13 @@ out: int show_pkg_info_from_repolist(const char *pkgname) { - struct repository_pool *rd; + struct repository_pool *rp; prop_dictionary_t repo_pkgd, pkg_propsd; int rv = 0; - SIMPLEQ_FOREACH(rd, &repopool_queue, chain) { + SIMPLEQ_FOREACH(rp, &repopool_queue, chain) { char *url = NULL; - repo_pkgd = xbps_find_pkg_in_dict(rd->rp_repod, + repo_pkgd = xbps_find_pkg_in_dict(rp->rp_repod, "packages", pkgname); if (repo_pkgd == NULL) { if (errno && errno != ENOENT) { @@ -213,13 +213,14 @@ show_pkg_info_from_repolist(const char *pkgname) } continue; } - url = xbps_get_path_from_pkg_dict_repo(repo_pkgd, rd->rp_uri); + url = xbps_repository_get_path_from_pkg_dict(repo_pkgd, + rp->rp_uri); if (url == NULL) { rv = errno; break; } - printf("Fetching info from: %s\n", rd->rp_uri); - pkg_propsd = xbps_get_pkg_plist_dict_from_url(url, + printf("Fetching info from: %s\n", rp->rp_uri); + pkg_propsd = xbps_repository_get_pkg_plist_dict_from_url(url, XBPS_PKGPROPS); if (pkg_propsd == NULL) { free(url); diff --git a/include/xbps_api.h b/include/xbps_api.h index 23dbe502..656a8e8b 100644 --- a/include/xbps_api.h +++ b/include/xbps_api.h @@ -205,12 +205,12 @@ int SYMEXPORT xbps_repository_update_allpkgs(void); prop_dictionary_t SYMEXPORT xbps_repository_get_transaction_dict(void); /* From lib/repository_plist.c */ -char SYMEXPORT - *xbps_get_path_from_pkg_dict_repo(prop_dictionary_t, const char *); +char SYMEXPORT *xbps_repository_get_path_from_pkg_dict(prop_dictionary_t, + const char *); prop_dictionary_t SYMEXPORT - xbps_get_pkg_plist_dict_from_repo(const char *, const char *); + xbps_repository_get_pkg_plist_dict(const char *, const char *); prop_dictionary_t SYMEXPORT - xbps_get_pkg_plist_dict_from_url(const char *, const char *); + xbps_repository_get_pkg_plist_dict_from_url(const char *, const char *); /* From lib/repository_pool.c */ struct repository_pool { diff --git a/lib/repository_plist.c b/lib/repository_plist.c index e44188ce..51656517 100644 --- a/lib/repository_plist.c +++ b/lib/repository_plist.c @@ -152,7 +152,7 @@ binpkg_in_cachedir(prop_dictionary_t d, const char *uri) } char SYMEXPORT * -xbps_get_path_from_pkg_dict_repo(prop_dictionary_t d, const char *uri) +xbps_repository_get_path_from_pkg_dict(prop_dictionary_t d, const char *uri) { const char *arch, *filen; char *path = NULL; @@ -170,7 +170,7 @@ xbps_get_path_from_pkg_dict_repo(prop_dictionary_t d, const char *uri) } prop_dictionary_t SYMEXPORT -xbps_get_pkg_plist_dict_from_url(const char *url, const char *plistf) +xbps_repository_get_pkg_plist_dict_from_url(const char *url, const char *plistf) { prop_dictionary_t plistd = NULL; struct archive *a; @@ -217,7 +217,7 @@ xbps_get_pkg_plist_dict_from_url(const char *url, const char *plistf) } prop_dictionary_t SYMEXPORT -xbps_get_pkg_plist_dict_from_repo(const char *pkgname, const char *plistf) +xbps_repository_get_pkg_plist_dict(const char *pkgname, const char *plistf) { prop_dictionary_t plistd = NULL, pkgd; struct repository_pool *rpool; @@ -246,10 +246,12 @@ xbps_get_pkg_plist_dict_from_repo(const char *pkgname, const char *plistf) break; continue; } - url = xbps_get_path_from_pkg_dict_repo(pkgd, rpool->rp_uri); + url = xbps_repository_get_path_from_pkg_dict(pkgd, + rpool->rp_uri); if (url == NULL) break; - plistd = xbps_get_pkg_plist_dict_from_url(url, plistf); + plistd = xbps_repository_get_pkg_plist_dict_from_url(url, + plistf); if (plistd != NULL) { free(url); break;