libalpm
Arch Linux Package Manager Library
|
Various libalpm functions More...
Typedefs | |
typedef int64_t | alpm_time_t |
The time type used by libalpm. | |
Enumerations | |
enum | alpm_caps { ALPM_CAPABILITY_NLS = (1 << 0) , ALPM_CAPABILITY_DOWNLOADER = (1 << 1) , ALPM_CAPABILITY_SIGNATURES = (1 << 2) } |
Enum of possible compile time features. More... | |
Functions | |
alpm_pkg_t * | alpm_sync_get_new_version (alpm_pkg_t *pkg, alpm_list_t *dbs_sync) |
Check for new version of pkg in syncdbs. | |
char * | alpm_compute_md5sum (const char *filename) |
Get the md5 sum of file. | |
char * | alpm_compute_sha256sum (const char *filename) |
Get the sha256 sum of file. | |
int | alpm_unlock (alpm_handle_t *handle) |
Remove the database lock file. | |
const char * | alpm_version (void) |
Get the version of library. | |
int | alpm_capabilities (void) |
Get the capabilities of the library. | |
int | alpm_sandbox_setup_child (alpm_handle_t *handle, const char *sandboxuser, const char *sandbox_path) |
Drop privileges by switching to a different user. | |
Various libalpm functions
typedef int64_t alpm_time_t |
The time type used by libalpm.
Represents a unix time stamp
enum alpm_caps |
int alpm_capabilities | ( | void | ) |
Get the capabilities of the library.
References ALPM_CAPABILITY_DOWNLOADER, ALPM_CAPABILITY_NLS, and ALPM_CAPABILITY_SIGNATURES.
char * alpm_compute_md5sum | ( | const char * | filename | ) |
Get the md5 sum of file.
filename | name of the file |
References ASSERT.
Referenced by extract_single_file(), and unlink_file().
char * alpm_compute_sha256sum | ( | const char * | filename | ) |
Get the sha256 sum of file.
filename | name of the file |
References ASSERT.
int alpm_sandbox_setup_child | ( | alpm_handle_t * | handle, |
const char * | sandboxuser, | ||
const char * | sandbox_path ) |
Drop privileges by switching to a different user.
handle | the context handle |
sandboxuser | the user to switch to |
sandbox_path | if non-NULL, restrict writes to this filesystem path |
References ASSERT.
Referenced by curl_download_internal_sandboxed().
alpm_pkg_t * alpm_sync_get_new_version | ( | alpm_pkg_t * | pkg, |
alpm_list_t * | dbs_sync ) |
Check for new version of pkg in syncdbs.
If the same package appears multiple dbs only the first will be checked
This only checks the syncdb for a newer version. It does not access the network at all. See alpm_db_update to update a database.
References ALPM_ERR_OK, ALPM_LOG_DEBUG, ASSERT, alpm_list_t::data, and alpm_list_t::next.
int alpm_unlock | ( | alpm_handle_t * | handle | ) |
Remove the database lock file.
handle | the context handle |
References ALPM_ERR_SYSTEM, ASSERT, and RET_ERR_ASYNC_SAFE.
const char * alpm_version | ( | void | ) |
Get the version of library.