xbps-query(8: added --cat=FILE mode support.
- This mode prints to stdout the matching FILE stored in a binary package. - ABI break: renamed xbps_get_pkg_plist_from_binpkg() xbps_binpkg_get_plist(). - Added xbps_binpkg_get_file() as a generic way to get pkg file contents. - Removed useless comments from xbps_api_impl.h.
This commit is contained in:
@ -48,7 +48,7 @@
|
||||
*
|
||||
* This header documents the full API for the XBPS Library.
|
||||
*/
|
||||
#define XBPS_API_VERSION "20141113-1"
|
||||
#define XBPS_API_VERSION "20141117"
|
||||
|
||||
#ifndef XBPS_VERSION
|
||||
#define XBPS_VERSION "UNSET"
|
||||
@ -1131,17 +1131,27 @@ int xbps_transaction_commit(struct xbps_handle *xhp);
|
||||
/*@{*/
|
||||
|
||||
/**
|
||||
* Internalizes a plist file in a binary package file stored locally or
|
||||
* remotely as specified in \a fname.
|
||||
* Returns a buffer of a file stored in a binary package locally or
|
||||
* remotely as specified in the url \a url.
|
||||
*
|
||||
* @param[in] fname Full URL to binary package file (local or remote path).
|
||||
* @param[in] plistf Plist file name to internalize.
|
||||
* @param[in] url Full URL to binary package file (local or remote path).
|
||||
* @param[in] fname File name to match.
|
||||
*
|
||||
* @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);
|
||||
/**
|
||||
* Internalizes a plist file in a binary package file stored locally or
|
||||
* remotely as specified in the url \a url.
|
||||
*
|
||||
* @param[in] url Full URL to binary package file (local or remote path).
|
||||
* @param[in] p Proplist file name to internalize as a dictionary.
|
||||
*
|
||||
* @return An internalized proplib dictionary, otherwise NULL and
|
||||
* errno is set appropiately.
|
||||
*/
|
||||
xbps_dictionary_t xbps_get_pkg_plist_from_binpkg(const char *fname,
|
||||
const char *plistf);
|
||||
xbps_dictionary_t xbps_binpkg_get_plist(const char *url, const char *p);
|
||||
|
||||
/*@}*/
|
||||
|
||||
@ -1410,17 +1420,6 @@ int xbps_repo_key_import(struct xbps_repo *repo);
|
||||
/** @addtogroup archive_util */
|
||||
/*@{*/
|
||||
|
||||
/**
|
||||
* Returns a proplib dictionary if \a entry is matched in the \a ar archive.
|
||||
*
|
||||
* @param[in] ar The archive object.
|
||||
* @param[in] entry The archive_entry object (must be filled in properly).
|
||||
*
|
||||
* @return The internalized proplib dictionary, NULL otherwise.
|
||||
*/
|
||||
xbps_dictionary_t xbps_archive_get_dictionary(struct archive *ar,
|
||||
struct archive_entry *entry);
|
||||
|
||||
/**
|
||||
* Appends a file to the \a ar archive by using a memory buffer \a buf of
|
||||
* size \a sizelen.
|
||||
|
@ -96,166 +96,58 @@
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/external/dewey.c
|
||||
*/
|
||||
int HIDDEN dewey_match(const char *, const char *);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/pkgdb.c
|
||||
*/
|
||||
int HIDDEN xbps_pkgdb_init(struct xbps_handle *);
|
||||
void HIDDEN xbps_pkgdb_release(struct xbps_handle *);
|
||||
int HIDDEN xbps_pkgdb_conversion(struct xbps_handle *);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/plist.c
|
||||
*/
|
||||
int HIDDEN xbps_array_replace_dict_by_name(xbps_array_t,
|
||||
xbps_dictionary_t,
|
||||
const char *);
|
||||
int HIDDEN xbps_array_replace_dict_by_pattern(xbps_array_t,
|
||||
xbps_dictionary_t,
|
||||
const char *);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/plist_remove.c
|
||||
*/
|
||||
int HIDDEN xbps_array_replace_dict_by_name(xbps_array_t, xbps_dictionary_t,
|
||||
const char *);
|
||||
int HIDDEN xbps_array_replace_dict_by_pattern(xbps_array_t, xbps_dictionary_t,
|
||||
const char *);
|
||||
bool HIDDEN xbps_remove_pkg_from_array_by_name(xbps_array_t, const char *);
|
||||
bool HIDDEN xbps_remove_pkg_from_array_by_pattern(xbps_array_t, const char *);
|
||||
bool HIDDEN xbps_remove_pkg_from_array_by_pkgver(xbps_array_t, const char *);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/download.c
|
||||
*/
|
||||
void HIDDEN xbps_fetch_set_cache_connection(int, int);
|
||||
void HIDDEN xbps_fetch_unset_cache_connection(void);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/package_msg.c
|
||||
*/
|
||||
int HIDDEN xbps_cb_message(struct xbps_handle *, xbps_dictionary_t, const char *);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/package_config_files.c
|
||||
*/
|
||||
int HIDDEN xbps_entry_is_a_conf_file(xbps_dictionary_t, const char *);
|
||||
int HIDDEN xbps_entry_install_conf_file(struct xbps_handle *,
|
||||
xbps_dictionary_t,
|
||||
xbps_dictionary_t,
|
||||
struct archive_entry *,
|
||||
const char *,
|
||||
const char *);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/repo.c
|
||||
*/
|
||||
void HIDDEN xbps_repo_invalidate(struct xbps_repo *);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/repo_pkgdeps.c
|
||||
*/
|
||||
int HIDDEN xbps_repository_find_deps(struct xbps_handle *,
|
||||
xbps_array_t,
|
||||
xbps_dictionary_t);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/plist_find.c
|
||||
*/
|
||||
int HIDDEN xbps_entry_install_conf_file(struct xbps_handle *, xbps_dictionary_t,
|
||||
xbps_dictionary_t, struct archive_entry *, const char *,
|
||||
const char *);
|
||||
int HIDDEN xbps_repository_find_deps(struct xbps_handle *, xbps_array_t,
|
||||
xbps_dictionary_t);
|
||||
xbps_dictionary_t HIDDEN xbps_find_pkg_in_dict(xbps_dictionary_t, const char *);
|
||||
xbps_dictionary_t HIDDEN xbps_find_virtualpkg_in_dict(struct xbps_handle *, xbps_dictionary_t, const char *);
|
||||
xbps_dictionary_t HIDDEN xbps_find_pkg_in_array(xbps_array_t, const char *, const char *);
|
||||
xbps_dictionary_t HIDDEN xbps_find_virtualpkg_in_array(struct xbps_handle *, xbps_array_t, const char *, const char *);
|
||||
/**
|
||||
* @private
|
||||
* From lib/transaction_revdeps.c
|
||||
*/
|
||||
xbps_dictionary_t HIDDEN xbps_find_virtualpkg_in_dict(struct xbps_handle *,
|
||||
xbps_dictionary_t, const char *);
|
||||
xbps_dictionary_t HIDDEN xbps_find_pkg_in_array(xbps_array_t, const char *,
|
||||
const char *);
|
||||
xbps_dictionary_t HIDDEN xbps_find_virtualpkg_in_array(struct xbps_handle *,
|
||||
xbps_array_t, const char *, const char *);
|
||||
void HIDDEN xbps_transaction_revdeps(struct xbps_handle *, xbps_array_t);
|
||||
|
||||
/**
|
||||
* @privuate
|
||||
* From lib/transaction_shlibs.c
|
||||
*/
|
||||
bool HIDDEN xbps_transaction_shlibs(struct xbps_handle *, xbps_array_t, xbps_array_t);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/transaction_dictionary.c
|
||||
*/
|
||||
bool HIDDEN xbps_transaction_shlibs(struct xbps_handle *, xbps_array_t,
|
||||
xbps_array_t);
|
||||
int HIDDEN xbps_transaction_init(struct xbps_handle *);
|
||||
|
||||
int HIDDEN xbps_transaction_store(struct xbps_handle *, xbps_array_t, xbps_dictionary_t, bool);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/repo_sync.c
|
||||
*/
|
||||
int HIDDEN xbps_transaction_store(struct xbps_handle *, xbps_array_t,
|
||||
xbps_dictionary_t, bool);
|
||||
char HIDDEN *xbps_get_remote_repo_string(const char *);
|
||||
int HIDDEN xbps_repo_sync(struct xbps_handle *, const char *);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/util_hash.c
|
||||
*/
|
||||
int HIDDEN xbps_file_hash_check_dictionary(struct xbps_handle *,
|
||||
xbps_dictionary_t d,
|
||||
const char *,
|
||||
const char *);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/external/fexec.c
|
||||
*/
|
||||
xbps_dictionary_t, const char *, const char *);
|
||||
int HIDDEN xbps_file_exec(struct xbps_handle *, const char *, ...);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/cb_util.c
|
||||
*/
|
||||
void HIDDEN xbps_set_cb_fetch(struct xbps_handle *, off_t, off_t, off_t,
|
||||
const char *, bool, bool, bool);
|
||||
const char *, bool, bool, bool);
|
||||
int HIDDEN xbps_set_cb_state(struct xbps_handle *, xbps_state_t, int,
|
||||
const char *, const char *, ...);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/package_unpack.c
|
||||
*/
|
||||
const char *, const char *, ...);
|
||||
int HIDDEN xbps_unpack_binary_pkg(struct xbps_handle *, xbps_dictionary_t);
|
||||
|
||||
int HIDDEN xbps_transaction_package_replace(struct xbps_handle *, xbps_array_t);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/package_remove.c
|
||||
*/
|
||||
int HIDDEN xbps_remove_pkg(struct xbps_handle *, const char *, bool);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/package_register.c
|
||||
*/
|
||||
int HIDDEN xbps_register_pkg(struct xbps_handle *, xbps_dictionary_t);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* From lib/package_conflicts.c
|
||||
*/
|
||||
void HIDDEN xbps_pkg_find_conflicts(struct xbps_handle *,
|
||||
xbps_array_t,
|
||||
xbps_dictionary_t);
|
||||
/**
|
||||
* @private
|
||||
* From lib/plist_find.c
|
||||
*/
|
||||
void HIDDEN xbps_pkg_find_conflicts(struct xbps_handle *, xbps_array_t,
|
||||
xbps_dictionary_t);
|
||||
char HIDDEN *xbps_archive_get_file(struct archive *, struct archive_entry *);
|
||||
xbps_dictionary_t HIDDEN xbps_archive_get_dictionary(struct archive *,
|
||||
struct archive_entry *);
|
||||
const char HIDDEN *vpkg_user_conf(struct xbps_handle *, const char *, bool);
|
||||
|
||||
#endif /* !_XBPS_API_IMPL_H_ */
|
||||
|
Reference in New Issue
Block a user