libxbps: modify the API, new func xbps_get_binpkg_repo_uri().
This function replaces xbps_repository_get_path_from_pkg_dict() and xbps_get_binpkg_local_path(). It takes a pkg dictionary as returned by a repository pkg index or a transaction dictionary and returns a string with the full path to the binary pkg, either in local repos, cachedir or remote repos. Update all code to use this function... sorry I broke ABI compatiblity.
This commit is contained in:
@@ -91,7 +91,7 @@ find_files_in_package(struct repository_pool_index *rpi, void *arg, bool *done)
|
||||
|
||||
printf("Looking in repository '%s', please wait...\n", rpi->rpi_uri);
|
||||
while ((obj = prop_object_iterator_next(iter))) {
|
||||
url = xbps_repository_get_path_from_pkg_dict(obj, rpi->rpi_uri);
|
||||
url = xbps_get_binpkg_repo_uri(obj);
|
||||
if (url == NULL) {
|
||||
rv = -1;
|
||||
break;
|
||||
|
@@ -250,7 +250,7 @@ show_pkg_info_from_repolist(const char *pkgname)
|
||||
return errno;
|
||||
|
||||
prop_dictionary_get_cstring_nocopy(pkgd, "repository", &repoloc);
|
||||
url = xbps_repository_get_path_from_pkg_dict(pkgd, repoloc);
|
||||
url = xbps_get_binpkg_repo_uri(pkgd);
|
||||
if (url == NULL) {
|
||||
prop_object_release(pkgd);
|
||||
return errno;
|
||||
|
Reference in New Issue
Block a user