Gratuitous ABI break: xbps_binpkg_get_xxx() -> xbps_archive_fetch_xxx().

This commit is contained in:
Juan RP 2014-11-21 09:51:57 +01:00
parent 7e6b38f951
commit 1789e527a9
7 changed files with 16 additions and 16 deletions

View File

@ -136,7 +136,7 @@ repo_match_cb(struct xbps_handle *xhp,
bfile = xbps_repository_pkg_path(xhp, obj);
assert(bfile);
filesd = xbps_binpkg_get_plist(bfile, "/files.plist");
filesd = xbps_archive_fetch_plist(bfile, "/files.plist");
if (filesd == NULL) {
xbps_dbg_printf(xhp, "%s: couldn't fetch files.plist from %s: %s\n",
pkgver, bfile, strerror(errno));

View File

@ -323,7 +323,7 @@ repo_cat_file(struct xbps_handle *xhp, const char *pkg, const char *file)
return EINVAL;
xbps_dbg_printf(xhp, "matched pkg at %s\n", url);
rv = xbps_binpkg_get_file_into_fd(url, file, STDOUT_FILENO);
rv = xbps_archive_fetch_file_into_fd(url, file, STDOUT_FILENO);
free(url);
return rv;
}

View File

@ -80,7 +80,7 @@ index_add(struct xbps_handle *xhp, int args, int argmax, char **argv, bool force
/*
* Read metadata props plist dictionary from binary package.
*/
binpkgd = xbps_binpkg_get_plist(pkg, "/props.plist");
binpkgd = xbps_archive_fetch_plist(pkg, "/props.plist");
if (binpkgd == NULL) {
fprintf(stderr, "index: failed to read %s metadata for "
"`%s', skipping!\n", XBPS_PKGPROPS, pkg);

View File

@ -48,7 +48,7 @@
*
* This header documents the full API for the XBPS Library.
*/
#define XBPS_API_VERSION "20141120"
#define XBPS_API_VERSION "20141121"
#ifndef XBPS_VERSION
#define XBPS_VERSION "UNSET"
@ -1145,7 +1145,7 @@ int xbps_transaction_commit(struct xbps_handle *xhp);
/*@{*/
/**
* Returns a buffer of a file stored in a binary package locally or
* Returns a buffer of a file stored in an archive locally or
* remotely as specified in the url \a url.
*
* @param[in] url Full URL to binary package file (local or remote path).
@ -1154,10 +1154,10 @@ int xbps_transaction_commit(struct xbps_handle *xhp);
* @return A malloc(3)ed buffer with the contents of \a fname, NULL otherwise
* and errno is set appropiately.
*/
char *xbps_binpkg_get_file(const char *url, const char *fname);
char *xbps_archive_fetch_file(const char *url, const char *fname);
/**
* Returns a file stored in a binary package locally or
* Returns a file stored in an archive locally or
* remotely as specified in the url \a url and stores it into the
* file descriptor \a fd.
*
@ -1167,10 +1167,10 @@ char *xbps_binpkg_get_file(const char *url, const char *fname);
*
* @return 0 on success, an errno value otherwise.
*/
int xbps_binpkg_get_file_into_fd(const char *url, const char *fname, int fd);
int xbps_archive_fetch_file_into_fd(const char *url, const char *fname, int fd);
/**
* Internalizes a plist file in a binary package file stored locally or
* Internalizes a plist file in an archive stored locally or
* remotely as specified in the url \a url.
*
* @param[in] url Full URL to binary package file (local or remote path).
@ -1179,7 +1179,7 @@ int xbps_binpkg_get_file_into_fd(const char *url, const char *fname, int fd);
* @return An internalized proplib dictionary, otherwise NULL and
* errno is set appropiately.
*/
xbps_dictionary_t xbps_binpkg_get_plist(const char *url, const char *p);
xbps_dictionary_t xbps_archive_fetch_plist(const char *url, const char *p);
/*@}*/

View File

@ -140,7 +140,7 @@ open_archive(const char *url)
}
char *
xbps_binpkg_get_file(const char *url, const char *fname)
xbps_archive_fetch_file(const char *url, const char *fname)
{
struct archive *a;
struct archive_entry *entry;
@ -169,7 +169,7 @@ xbps_binpkg_get_file(const char *url, const char *fname)
}
int
xbps_binpkg_get_file_into_fd(const char *url, const char *fname, int fd)
xbps_archive_fetch_file_into_fd(const char *url, const char *fname, int fd)
{
struct archive *a;
struct archive_entry *entry;
@ -202,12 +202,12 @@ xbps_binpkg_get_file_into_fd(const char *url, const char *fname, int fd)
}
xbps_dictionary_t
xbps_binpkg_get_plist(const char *url, const char *plistf)
xbps_archive_fetch_plist(const char *url, const char *plistf)
{
xbps_dictionary_t d;
char *buf;
if ((buf = xbps_binpkg_get_file(url, plistf)) == NULL)
if ((buf = xbps_archive_fetch_file(url, plistf)) == NULL)
return NULL;
d = xbps_dictionary_internalize(buf);

View File

@ -277,7 +277,7 @@ xbps_repo_get_pkg_plist(struct xbps_handle *xhp, xbps_dictionary_t pkgd,
if (url == NULL)
return NULL;
bpkgd = xbps_binpkg_get_plist(url, plist);
bpkgd = xbps_archive_fetch_plist(url, plist);
free(url);
return bpkgd;
}

View File

@ -321,7 +321,7 @@ xbps_rpool_get_pkg_plist(struct xbps_handle *xhp,
errno = EINVAL;
goto out;
}
plistd = xbps_binpkg_get_plist(url, plistf);
plistd = xbps_archive_fetch_plist(url, plistf);
free(url);
out: