libalpm
Arch Linux Package Manager Library
|
Functions to initialize and release libalpm More...
Functions | |
alpm_handle_t * | alpm_initialize (const char *root, const char *dbpath, alpm_errno_t *err) |
Initializes the library. | |
int | alpm_release (alpm_handle_t *handle) |
Release the library. | |
Functions to initialize and release libalpm
alpm_handle_t * alpm_initialize | ( | const char * | root, |
const char * | dbpath, | ||
alpm_errno_t * | err ) |
Initializes the library.
Creates handle, connects to database and creates lockfile. This must be called before any other functions are called.
root | the root path for all filesystem operations |
dbpath | the absolute path to the libalpm database |
err | an optional variable to hold any error return codes |
References ALPM_ERR_MEMORY, alpm_list_add(), MALLOC, and STRDUP.
int alpm_release | ( | alpm_handle_t * | handle | ) |
Release the library.
Disconnects from the database, removes handle and lockfile This should be the last alpm call you make. After this returns, handle should be considered invalid and cannot be reused in any way.
handle | the context handle |
References ALPM_ERR_TRANS_NOT_NULL, ASSERT, CHECK_HANDLE, and RET_ERR.