API/ABI break for June 2011.
Rename some functions to reflect its description a bit better. --HG-- rename : lib/repository_plist.c => lib/plist_fetch.c
This commit is contained in:
@ -81,20 +81,20 @@ find_files_in_package(struct repository_pool_index *rpi, void *arg, bool *done)
|
||||
|
||||
(void)done;
|
||||
|
||||
iter = xbps_get_array_iter_from_dict(rpi->rpi_repod, "packages");
|
||||
iter = xbps_array_iter_from_dict(rpi->rpi_repod, "packages");
|
||||
if (iter == NULL)
|
||||
return -1;
|
||||
|
||||
printf("Looking in repository '%s', please wait...\n", rpi->rpi_uri);
|
||||
while ((obj = prop_object_iterator_next(iter))) {
|
||||
url = xbps_get_binpkg_repo_uri(obj, rpi->rpi_uri);
|
||||
url = xbps_path_from_repository_uri(obj, rpi->rpi_uri);
|
||||
if (url == NULL) {
|
||||
rv = -1;
|
||||
break;
|
||||
}
|
||||
prop_dictionary_get_cstring_nocopy(obj, "pkgname", &pkgname);
|
||||
prop_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver);
|
||||
pkg_filesd = xbps_repository_plist_find_pkg_dict_from_url(url,
|
||||
pkg_filesd = xbps_dictionary_metadata_plist_by_url(url,
|
||||
XBPS_PKGFILES);
|
||||
free(url);
|
||||
if (pkg_filesd == NULL) {
|
||||
|
@ -46,7 +46,7 @@ repoidx_getdict(const char *pkgdir)
|
||||
prop_array_t array;
|
||||
char *plist;
|
||||
|
||||
plist = xbps_get_pkg_index_plist(pkgdir);
|
||||
plist = xbps_pkg_index_plist(pkgdir);
|
||||
if (plist == NULL)
|
||||
return NULL;
|
||||
|
||||
@ -104,8 +104,7 @@ xbps_repo_addpkg_index(prop_dictionary_t idxdict, const char *filedir,
|
||||
goto out;
|
||||
}
|
||||
|
||||
newpkgd = xbps_repository_plist_find_pkg_dict_from_url(file,
|
||||
XBPS_PKGPROPS);
|
||||
newpkgd = xbps_dictionary_metadata_plist_by_url(file, XBPS_PKGPROPS);
|
||||
if (newpkgd == NULL) {
|
||||
xbps_error_printf("xbps-repo: can't read %s %s metadata "
|
||||
"file, skipping!\n", file, XBPS_PKGPROPS);
|
||||
@ -186,7 +185,7 @@ xbps_repo_addpkg_index(prop_dictionary_t idxdict, const char *filedir,
|
||||
rv = errno;
|
||||
goto out;
|
||||
}
|
||||
sha256 = xbps_get_file_hash(file);
|
||||
sha256 = xbps_file_hash(file);
|
||||
if (sha256 == NULL) {
|
||||
prop_object_release(newpkgd);
|
||||
rv = errno;
|
||||
@ -262,7 +261,7 @@ xbps_repo_genindex(const char *pkgdir)
|
||||
if (idxdict == NULL)
|
||||
return errno;
|
||||
|
||||
plist = xbps_get_pkg_index_plist(pkgdir);
|
||||
plist = xbps_pkg_index_plist(pkgdir);
|
||||
if (plist == NULL) {
|
||||
prop_object_release(idxdict);
|
||||
return errno;
|
||||
|
@ -201,7 +201,7 @@ main(int argc, char **argv)
|
||||
if (argc != 2)
|
||||
usage();
|
||||
|
||||
pkgd = xbps_repository_plist_find_pkg_dict(argv[1],
|
||||
pkgd = xbps_repository_pool_dictionary_metadata_plist(argv[1],
|
||||
XBPS_PKGFILES);
|
||||
if (pkgd == NULL) {
|
||||
if (errno != ENOENT) {
|
||||
|
@ -186,7 +186,7 @@ register_repository(const char *uri)
|
||||
return 0;
|
||||
}
|
||||
|
||||
plist = xbps_get_pkg_index_plist(idxstr);
|
||||
plist = xbps_pkg_index_plist(idxstr);
|
||||
} else {
|
||||
/*
|
||||
* Create metadir if necessary.
|
||||
@ -203,7 +203,7 @@ register_repository(const char *uri)
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
free(metadir);
|
||||
plist = xbps_get_pkg_index_plist(idxstr);
|
||||
plist = xbps_pkg_index_plist(idxstr);
|
||||
}
|
||||
|
||||
if (plist == NULL)
|
||||
@ -296,7 +296,7 @@ repo_sync_pkg_index_cb(struct repository_pool_index *rpi, void *arg, bool *done)
|
||||
printf("Package index file is already up to date.\n");
|
||||
return 0;
|
||||
}
|
||||
if ((plist = xbps_get_pkg_index_plist(rpi->rpi_uri)) == NULL)
|
||||
if ((plist = xbps_pkg_index_plist(rpi->rpi_uri)) == NULL)
|
||||
return EINVAL;
|
||||
|
||||
if ((rp = pkgindex_verify(plist, rpi->rpi_uri)) == NULL)
|
||||
|
Reference in New Issue
Block a user