![]() |
XBPS Library API
0.19
The X Binary Package System
|
Functions | |
int | xbps_remove_pkg (struct xbps_handle *xhp, const char *pkgver, bool update, bool soft_replace) |
int | xbps_remove_pkg_files (struct xbps_handle *xhp, prop_dictionary_t dict, const char *key, const char *pkgver) |
These functions will remove a package or only a subset of its files. Package removal steps:
The following image shows the structure of an internalized package's files.plist dictionary:
Legend:
Text inside of white boxes are the key associated with the object, its data type is specified on its edge, i.e string, array, integer, dictionary.
int xbps_remove_pkg | ( | struct xbps_handle * | xhp, |
const char * | pkgver, | ||
bool | update, | ||
bool | soft_replace | ||
) |
Remove an installed package.
[in] | xhp | The pointer to the xbps_handle struct. |
[in] | pkgver | Package name/version to match. |
[in] | update | If true, some steps will be skipped. See in the detailed description above for more information. |
[in] | soft_replace | If true, some steps will be skipped. See in the detailed description above for more information. |
Definition at line 208 of file package_remove.c.
References xbps_handle::metadir, xbps_handle::rootdir, xbps_pkg_exec_script(), xbps_pkg_name(), xbps_pkg_state_installed(), xbps_pkg_version(), xbps_remove_pkg_files(), xbps_set_pkg_state_installed(), xbps_unregister_pkg(), and xbps_xasprintf().
Referenced by xbps_transaction_commit().
int xbps_remove_pkg_files | ( | struct xbps_handle * | xhp, |
prop_dictionary_t | dict, | ||
const char * | key, | ||
const char * | pkgver | ||
) |
Remove files defined in a proplib array as specified by key of an installed package.
[in] | xhp | The pointer to the xbps_handle struct. |
[in] | dict | Proplib dictionary internalized from package's XBPS_PKGFILES definition in package's metadata directory. The image in Detailed description shows off its structure. |
[in] | key | Key of the array object to match, valid values are: files, dirs, links and conf_files. |
[in] | pkgver | Package/version string matching package dictionary, i.e `foo-1.0'. |
Definition at line 75 of file package_remove.c.
References xbps_handle::flags, xbps_handle::rootdir, xbps_array_iter_from_dict(), xbps_file_hash_check(), xbps_pkg_name(), xbps_pkg_version(), and xbps_xasprintf().
Referenced by xbps_remove_pkg().