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
This commit is contained in:
parent
d90a248244
commit
94bb169c88
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user