![]() |
XBPS Library API 20250923
The X Binary Package System
|
Functions | |
| int | xbps_alternatives_set (struct xbps_handle *xhp, const char *pkg, const char *group) |
| int | xbps_alternatives_register (struct xbps_handle *xhp, xbps_dictionary_t pkgd) |
| int | xbps_alternatives_unregister (struct xbps_handle *xhp, xbps_dictionary_t pkgd) |
These functions implement the alternatives framework.
| int xbps_alternatives_set | ( | struct xbps_handle * | xhp, |
| const char * | pkg, | ||
| const char * | group ) |
Sets all alternatives provided by this pkg, or only those set by a group.
| [in] | xhp | The pointer to the xbps_handle struct. |
| [in] | pkg | Package name to match. |
| [in] | group | Alternatives group to match. |
Definition at line 241 of file package_alternatives.c.
References xbps_handle::pkgdb, xbps_pkgdb_get_pkg(), and xbps_remove_string_from_array().
| int xbps_alternatives_register | ( | struct xbps_handle * | xhp, |
| xbps_dictionary_t | pkgd ) |
Registers all alternative groups provided by a package.
| [in] | xhp | The pointer to the xbps_handle struct. |
| [in] | pkgd | Package dictionary as stored in the transaction dictionary. |
Definition at line 533 of file package_alternatives.c.
References xbps_handle::pkgdb, and xbps_match_string_in_array().
| int xbps_alternatives_unregister | ( | struct xbps_handle * | xhp, |
| xbps_dictionary_t | pkgd ) |
Unregisters all alternative groups provided by a package.
| [in] | xhp | The pointer to the xbps_handle struct. |
| [in] | pkgd | Package dictionary as stored in the transaction dictionary. |
Definition at line 334 of file package_alternatives.c.
References xbps_handle::pkgdb, and xbps_remove_string_from_array().