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:
Juan RP
2011-01-18 18:21:55 +01:00
parent 6d7121c5bd
commit fe15380e1b
7 changed files with 79 additions and 126 deletions

View File

@ -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;