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);
|
free(lbinfile);
|
||||||
return errno;
|
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) {
|
if (binfile == NULL) {
|
||||||
free(lbinfile);
|
free(lbinfile);
|
||||||
return errno;
|
return errno;
|
||||||
|
@ -106,7 +106,8 @@ xbps_repo_addpkg_index(prop_dictionary_t idxdict, const char *filedir,
|
|||||||
goto out;
|
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) {
|
if (newpkgd == NULL) {
|
||||||
printf("%s: can't read %s metadata file, skipping!\n",
|
printf("%s: can't read %s metadata file, skipping!\n",
|
||||||
file, XBPS_PKGPROPS);
|
file, XBPS_PKGPROPS);
|
||||||
|
@ -176,7 +176,7 @@ main(int argc, char **argv)
|
|||||||
if (argc != 2)
|
if (argc != 2)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
pkgd = xbps_get_pkg_plist_dict_from_repo(argv[1],
|
pkgd = xbps_repository_get_pkg_plist_dict(argv[1],
|
||||||
XBPS_PKGFILES);
|
XBPS_PKGFILES);
|
||||||
if (pkgd == NULL) {
|
if (pkgd == NULL) {
|
||||||
printf("E: couldn't read %s: %s.\n", XBPS_PKGFILES,
|
printf("E: couldn't read %s: %s.\n", XBPS_PKGFILES,
|
||||||
|
@ -198,13 +198,13 @@ out:
|
|||||||
int
|
int
|
||||||
show_pkg_info_from_repolist(const char *pkgname)
|
show_pkg_info_from_repolist(const char *pkgname)
|
||||||
{
|
{
|
||||||
struct repository_pool *rd;
|
struct repository_pool *rp;
|
||||||
prop_dictionary_t repo_pkgd, pkg_propsd;
|
prop_dictionary_t repo_pkgd, pkg_propsd;
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|
||||||
SIMPLEQ_FOREACH(rd, &repopool_queue, chain) {
|
SIMPLEQ_FOREACH(rp, &repopool_queue, chain) {
|
||||||
char *url = NULL;
|
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);
|
"packages", pkgname);
|
||||||
if (repo_pkgd == NULL) {
|
if (repo_pkgd == NULL) {
|
||||||
if (errno && errno != ENOENT) {
|
if (errno && errno != ENOENT) {
|
||||||
@ -213,13 +213,14 @@ show_pkg_info_from_repolist(const char *pkgname)
|
|||||||
}
|
}
|
||||||
continue;
|
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) {
|
if (url == NULL) {
|
||||||
rv = errno;
|
rv = errno;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
printf("Fetching info from: %s\n", rd->rp_uri);
|
printf("Fetching info from: %s\n", rp->rp_uri);
|
||||||
pkg_propsd = xbps_get_pkg_plist_dict_from_url(url,
|
pkg_propsd = xbps_repository_get_pkg_plist_dict_from_url(url,
|
||||||
XBPS_PKGPROPS);
|
XBPS_PKGPROPS);
|
||||||
if (pkg_propsd == NULL) {
|
if (pkg_propsd == NULL) {
|
||||||
free(url);
|
free(url);
|
||||||
|
@ -205,12 +205,12 @@ int SYMEXPORT xbps_repository_update_allpkgs(void);
|
|||||||
prop_dictionary_t SYMEXPORT xbps_repository_get_transaction_dict(void);
|
prop_dictionary_t SYMEXPORT xbps_repository_get_transaction_dict(void);
|
||||||
|
|
||||||
/* From lib/repository_plist.c */
|
/* From lib/repository_plist.c */
|
||||||
char SYMEXPORT
|
char SYMEXPORT *xbps_repository_get_path_from_pkg_dict(prop_dictionary_t,
|
||||||
*xbps_get_path_from_pkg_dict_repo(prop_dictionary_t, const char *);
|
const char *);
|
||||||
prop_dictionary_t SYMEXPORT
|
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
|
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 */
|
/* From lib/repository_pool.c */
|
||||||
struct repository_pool {
|
struct repository_pool {
|
||||||
|
@ -152,7 +152,7 @@ binpkg_in_cachedir(prop_dictionary_t d, const char *uri)
|
|||||||
}
|
}
|
||||||
|
|
||||||
char SYMEXPORT *
|
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;
|
const char *arch, *filen;
|
||||||
char *path = NULL;
|
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
|
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;
|
prop_dictionary_t plistd = NULL;
|
||||||
struct archive *a;
|
struct archive *a;
|
||||||
@ -217,7 +217,7 @@ xbps_get_pkg_plist_dict_from_url(const char *url, const char *plistf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
prop_dictionary_t SYMEXPORT
|
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;
|
prop_dictionary_t plistd = NULL, pkgd;
|
||||||
struct repository_pool *rpool;
|
struct repository_pool *rpool;
|
||||||
@ -246,10 +246,12 @@ xbps_get_pkg_plist_dict_from_repo(const char *pkgname, const char *plistf)
|
|||||||
break;
|
break;
|
||||||
continue;
|
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)
|
if (url == NULL)
|
||||||
break;
|
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) {
|
if (plistd != NULL) {
|
||||||
free(url);
|
free(url);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user