XBPS Library API 20240111
The X Binary Package System
|
Data Structures | |
struct | xbps_repo |
Repository structure. More... | |
Functions | |
int | xbps_rpool_sync (struct xbps_handle *xhp, const char *uri) |
int | xbps_rpool_foreach (struct xbps_handle *xhp, int(*fn)(struct xbps_repo *, void *, bool *), void *arg) |
struct xbps_repo * | xbps_rpool_get_repo (const char *url) |
xbps_dictionary_t | xbps_rpool_get_pkg (struct xbps_handle *xhp, const char *pkg) |
xbps_dictionary_t | xbps_rpool_get_virtualpkg (struct xbps_handle *xhp, const char *pkg) |
xbps_array_t | xbps_rpool_get_pkg_revdeps (struct xbps_handle *xhp, const char *pkg) |
xbps_array_t | xbps_rpool_get_pkg_fulldeptree (struct xbps_handle *xhp, const char *pkg) |
struct xbps_repo |
Repository object structure registered in a private simple queue. The structure contains repository data: uri and dictionaries associated.
Data Fields | |
struct xbps_handle * | xhp |
xbps_dictionary_t | idx |
xbps_dictionary_t | idxmeta |
const char * | uri |
bool | is_remote |
bool | is_signed |
xhp |
Pointer to our xbps_handle struct passed to xbps_rpool_foreach.
Definition at line 1422 of file xbps.h.
Referenced by xbps_repo_get_pkg(), xbps_repo_get_virtualpkg(), xbps_repo_key_import(), xbps_repo_open(), xbps_repo_public_open(), xbps_repo_remove(), xbps_repo_stage_open(), xbps_repo_store(), xbps_rpool_foreach(), xbps_transaction_autoremove_pkgs(), xbps_transaction_install_pkg(), xbps_transaction_remove_pkg(), xbps_transaction_update_packages(), xbps_transaction_update_pkg(), and xbps_verify_signature().
idx |
Proplib dictionary associated with the repository index.
Definition at line 1428 of file xbps.h.
Referenced by xbps_repo_fetch_remote(), xbps_repo_get_pkg(), xbps_repo_get_pkg_revdeps(), xbps_repo_get_virtualpkg(), xbps_repo_open(), xbps_repo_release(), xbps_transaction_autoremove_pkgs(), xbps_transaction_install_pkg(), xbps_transaction_pkg_type(), xbps_transaction_pkg_type_set(), xbps_transaction_remove_pkg(), xbps_transaction_update_packages(), and xbps_transaction_update_pkg().
idxmeta |
Proplib dictionary associated with the repository index-meta.
Definition at line 1434 of file xbps.h.
Referenced by xbps_repo_fetch_remote(), xbps_repo_key_import(), xbps_repo_release(), and xbps_verify_signature().
uri |
URI string associated with repository.
Definition at line 1440 of file xbps.h.
Referenced by xbps_repo_get_pkg(), xbps_repo_get_virtualpkg(), xbps_repo_key_import(), xbps_rpool_get_repo(), and xbps_verify_signature().
bool is_remote |
var is_remote
True if repository is remote, false if it's a local repository.
Definition at line 1450 of file xbps.h.
Referenced by xbps_repo_open().
bool is_signed |
var is_signed
True if this repository has been signed, false otherwise.
Definition at line 1456 of file xbps.h.
Referenced by xbps_repo_fetch_remote().
int xbps_rpool_sync | ( | struct xbps_handle * | xhp, |
const char * | uri | ||
) |
Synchronizes repository data for all remote repositories as specified in the configuration file or if uri argument is set, just sync for that repository.
[in] | xhp | Pointer to the xbps_handle struct. |
[in] | uri | Repository URI to match for sync (optional). |
int xbps_rpool_foreach | ( | struct xbps_handle * | xhp, |
int(*)(struct xbps_repo *, void *, bool *) | fn, | ||
void * | arg | ||
) |
Iterates over the repository pool and executes the fn function callback passing in the void * arg argument to it. The bool pointer argument can be used in the callbacks to stop immediately the loop if set to true, otherwise it will only be stopped if it returns a non-zero value. Removes repos failed to open from pool. This condition causes function to return error, but don't break the loop.
[in] | xhp | Pointer to the xbps_handle struct. |
[in] | fn | Function callback to execute for every repository registered in the pool. |
[in] | arg | Opaque data passed in to the fn function callback for client data. |
Definition at line 139 of file rpool.c.
References xbps_handle::repositories, xbps_repo_open(), xbps_repo_remove(), xbps_rpool_get_repo(), and xbps_repo::xhp.
struct xbps_repo * xbps_rpool_get_repo | ( | const char * | url | ) |
Returns a pointer to a struct xbps_repo matching url.
[in] | url | Repository url to match. |
Definition at line 112 of file rpool.c.
References xbps_repo::uri.
Referenced by xbps_rpool_foreach().
xbps_dictionary_t xbps_rpool_get_pkg | ( | struct xbps_handle * | xhp, |
const char * | pkg | ||
) |
Finds a package dictionary in the repository pool by specifying a package pattern or a package name. This function does not take into account virtual packages, just matches real packages.
[in] | xhp | Pointer to the xbps_handle struct. |
[in] | pkg | Package pattern, exact pkg or pkg name. |
Definition at line 329 of file rpool.c.
References xbps_handle::flags.
xbps_dictionary_t xbps_rpool_get_virtualpkg | ( | struct xbps_handle * | xhp, |
const char * | pkg | ||
) |
Finds a package dictionary in repository pool by specifying a virtual package pattern or a package name.
[in] | xhp | Pointer to the xbps_handle struct. |
[in] | pkg | Virtual package pattern or name to match. |
xbps_array_t xbps_rpool_get_pkg_revdeps | ( | struct xbps_handle * | xhp, |
const char * | pkg | ||
) |
Returns a proplib array of strings with reverse dependencies of all registered repositories matching the expression pkg.
[in] | xhp | Pointer to the xbps_handle structure. |
[in] | pkg | Package expression to match in this repository index. |
xbps_array_t xbps_rpool_get_pkg_fulldeptree | ( | struct xbps_handle * | xhp, |
const char * | pkg | ||
) |
Returns a proplib array of strings with a proper sorted list of packages of a full dependency graph for pkg.
[in] | xhp | The pointer to the xbps_handle struct. |
[in] | pkg | Package expression to match. |