XBPS Library API 20240111
The X Binary Package System
Functions
Package configuration functions

Functions

int xbps_configure_pkg (struct xbps_handle *xhp, const char *pkgname, bool check_state, bool update)
 
int xbps_configure_packages (struct xbps_handle *xhp, xbps_array_t ignpkgs)
 

Detailed Description

Configure a package or all packages. Only packages in XBPS_PKG_STATE_UNPACKED state will be processed (unless overriden). Package configuration steps:

Note
If the XBPS_FLAG_FORCE_CONFIGURE is set through xbps_init() in the flags member, the package (or packages) will be reconfigured even if its state is XBPS_PKG_STATE_INSTALLED.

Function Documentation

◆ xbps_configure_pkg()

int xbps_configure_pkg ( struct xbps_handle xhp,
const char *  pkgname,
bool  check_state,
bool  update 
)

Configure (or force reconfiguration of) a package.

Parameters
[in]xhpPointer to an xbps_handle struct.
[in]pkgnamePackage name to configure.
[in]check_stateSet it to true to check that package is in unpacked state.
[in]updateSet it to true if this package is being updated.
Returns
0 on success, otherwise an errno value.

Definition at line 91 of file package_configure.c.

References xbps_handle::flags, xbps_pkg_exec_script(), xbps_pkg_name(), xbps_pkg_state_dictionary(), xbps_pkgdb_get_pkg(), and xbps_set_pkg_state_dictionary().

Referenced by xbps_configure_packages(), and xbps_transaction_commit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xbps_configure_packages()

int xbps_configure_packages ( struct xbps_handle xhp,
xbps_array_t  ignpkgs 
)

Configure (or force reconfiguration of) all packages.

Parameters
[in]xhpPointer to an xbps_handle struct.
[in]ignpkgsProplib array of strings with pkgname or pkgvers to ignore.
Returns
0 on success, otherwise an errno value.

Definition at line 53 of file package_configure.c.

References xbps_handle::pkgdb, xbps_configure_pkg(), xbps_match_pkgver_in_array(), and xbps_match_string_in_array().

Here is the call graph for this function: