![]() |
XBPS Library API
0.19
The X Binary Package System
|
Functions | |
int | xbps_register_pkg (struct xbps_handle *xhp, prop_dictionary_t pkg_dict, bool flush) |
int | xbps_unregister_pkg (struct xbps_handle *xhp, const char *pkgver, bool flush) |
Register and unregister packages into/from the installed packages database.
int xbps_register_pkg | ( | struct xbps_handle * | xhp, |
prop_dictionary_t | pkg_dict, | ||
bool | flush | ||
) |
Register a package into the installed packages database.
[in] | xhp | The pointer to the xbps_handle struct. |
[in] | pkg_dict | A dictionary with the following objects: pkgname, version, pkgver, short_desc (string), automatic-install (bool) and optionally provides (array of strings). |
[in] | flush | Set to true to make sure that pkgdb plist is written to storage on success. |
Definition at line 44 of file package_register.c.
References xbps_handle::flags, xbps_handle::metadir, xbps_file_hash(), xbps_pkgdb_get_pkg(), xbps_pkgdb_replace_pkg(), and xbps_xasprintf().
Referenced by xbps_transaction_commit().
int xbps_unregister_pkg | ( | struct xbps_handle * | xhp, |
const char * | pkgver, | ||
bool | flush | ||
) |
Unregister a package from the package database.
[in] | xhp | The pointer to the xbps_handle struct. |
[in] | pkgver | Package name-version to match. |
[in] | flush | Set to true to make sure that pkgdb plist is written to storage on success. |
Definition at line 183 of file package_register.c.
References xbps_pkgdb_remove_pkg().
Referenced by xbps_remove_pkg().