![]() |
XBPS Library API
0.19
The X Binary Package System
|
Data Structures | |
struct | xbps_rindex |
Repository pool index structure. More... | |
Functions | |
int | xbps_rpool_foreach (struct xbps_handle *xhp, int(*fn)(struct xbps_rindex *, void *, bool *), void *arg) |
prop_dictionary_t | xbps_rpool_get_pkg (struct xbps_handle *xhp, const char *pkg) |
prop_dictionary_t | xbps_rpool_get_pkg_plist (struct xbps_handle *xhp, const char *pattern, const char *plistf) |
prop_dictionary_t | xbps_rpool_get_virtualpkg (struct xbps_handle *xhp, const char *pkg) |
int | xbps_rpool_sync (struct xbps_handle *xhp, const char *file, const char *uri) |
int xbps_rpool_foreach | ( | struct xbps_handle * | xhp, |
int(*)(struct xbps_rindex *, 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.
[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 181 of file rpool.c.
References xbps_rindex::repod, xbps_rindex::uri, and xbps_rindex::xhp.
prop_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 179 of file rpool_get.c.
References xbps_pkg_version(), and xbps_pkgpattern_version().
Referenced by xbps_rpool_get_pkg_plist().
prop_dictionary_t xbps_rpool_get_pkg_plist | ( | struct xbps_handle * | xhp, |
const char * | pattern, | ||
const char * | plistf | ||
) |
Iterate over the the repository pool and search for a metadata plist file in a binary package matching `pattern'. If a package is matched the plist file plistf will be internalized into a proplib dictionary.
When pattern is a pkgname, the newest package available in repositories will be used. Otherwise the first repository matching pattern.
[in] | xhp | Pointer to the xbps_handle struct. |
[in] | pattern | Package name or package pattern to match, i.e `foo>=1.0'. |
[in] | plistf | Plist file name to match, i.e XBPS_PKGPROPS or XBPS_PKGFILES. |
Definition at line 191 of file rpool_get.c.
References xbps_get_pkg_plist_from_binpkg(), and xbps_rpool_get_pkg().
prop_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. |
Definition at line 170 of file rpool_get.c.
int xbps_rpool_sync | ( | struct xbps_handle * | xhp, |
const char * | file, | ||
const char * | uri | ||
) |
Synchronizes file for all remote repositories as specified in the configuration file or if uri argument is set, just sync file for that repository.
[in] | xhp | Pointer to the xbps_handle struct. |
[in] | file | File to synchronize. |
[in] | uri | Repository URI to match for sync (optional). |
Definition at line 154 of file rpool.c.
References xbps_fetch_error_string().