XBPS Library API  0.19
The X Binary Package System
Enumerations | Functions
Package state handling functions

Enumerations

enum  pkg_state_t
 

Functions

int xbps_pkg_state_dictionary (prop_dictionary_t dict, pkg_state_t *state)
 
int xbps_pkg_state_installed (struct xbps_handle *xhp, const char *pkgname, pkg_state_t *state)
 
int xbps_set_pkg_state_dictionary (prop_dictionary_t dict, pkg_state_t state)
 
int xbps_set_pkg_state_installed (struct xbps_handle *xhp, const char *pkgname, const char *version, pkg_state_t state)
 

Detailed Description

Enumeration Type Documentation

Integer representing a state on which a package may be. Possible values for this are:

  • XBPS_PKG_STATE_UNPACKED: Package has been unpacked correctly but has not been configured due to unknown reasons.
  • XBPS_PKG_STATE_INSTALLED: Package has been installed successfully.
  • XBPS_PKG_STATE_BROKEN: not yet used.
  • XBPS_PKG_STATE_HALF_REMOVED: Package has been removed but not completely: the purge action in REMOVE script wasn't executed, pkg metadata directory still exists and is registered in package database.
  • XBPS_PKG_STATE_NOT_INSTALLED: Package going to be installed in a transaction dictionary but that has not been yet unpacked.

Definition at line 1445 of file xbps_api.h.

Function Documentation

int xbps_pkg_state_dictionary ( prop_dictionary_t  dict,
pkg_state_t state 
)

Gets package state from a package dictionary dict, and sets its state into state.

Parameters
[in]dictPackage dictionary.
[out]statePackage state returned.
Returns
0 on success, otherwise an errno value.

Definition at line 116 of file package_state.c.

Referenced by xbps_configure_pkg(), xbps_pkg_is_installed(), and xbps_transaction_install_pkg().

+ Here is the caller graph for this function:

int xbps_pkg_state_installed ( struct xbps_handle xhp,
const char *  pkgname,
pkg_state_t state 
)

Gets package state from package pkgname, and sets its state into state.

Parameters
[in]xhpThe pointer to an xbps_handle struct.
[in]pkgnamePackage name.
[out]statePackage state returned.
Returns
0 on success, otherwise an errno value.

Definition at line 95 of file package_state.c.

References xbps_pkgdb_get_pkg().

Referenced by xbps_remove_pkg().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int xbps_set_pkg_state_dictionary ( prop_dictionary_t  dict,
pkg_state_t  state 
)

Sets package state state in package dictionary dict.

Parameters
[in]dictPackage dictionary.
[in]statePackage state to be set.
Returns
0 on success, otherwise an errno value.

Definition at line 128 of file package_state.c.

Referenced by xbps_configure_pkg().

+ Here is the caller graph for this function:

int xbps_set_pkg_state_installed ( struct xbps_handle xhp,
const char *  pkgname,
const char *  version,
pkg_state_t  state 
)

Sets package state state in package pkgname.

Parameters
[in]xhpThe pointer to an xbps_handle struct.
[in]pkgnamePackage name.
[in]versionPackage version.
[in]statePackage state to be set.
Returns
0 on success, otherwise an errno value.

Definition at line 159 of file package_state.c.

References xbps_pkgdb_get_pkg().

Referenced by xbps_remove_pkg().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: