libalpm
Arch Linux Package Manager Library
|
Functions dealing with libalpm representation of dependency information. More...
Functions | |
alpm_list_t * | alpm_checkdeps (alpm_handle_t *handle, alpm_list_t *pkglist, alpm_list_t *remove, alpm_list_t *upgrade, int reversedeps) |
Checks dependencies and returns missing ones in a list. | |
alpm_pkg_t * | alpm_find_satisfier (alpm_list_t *pkgs, const char *depstring) |
Find a package satisfying a specified dependency. | |
alpm_pkg_t * | alpm_find_dbs_satisfier (alpm_handle_t *handle, alpm_list_t *dbs, const char *depstring) |
Find a package satisfying a specified dependency. | |
alpm_list_t * | alpm_checkconflicts (alpm_handle_t *handle, alpm_list_t *pkglist) |
Check the package conflicts in a database. | |
char * | alpm_dep_compute_string (const alpm_depend_t *dep) |
Returns a newly allocated string representing the dependency information. |
Functions dealing with libalpm representation of dependency information.
alpm_list_t* alpm_checkconflicts | ( | alpm_handle_t * | handle, |
alpm_list_t * | pkglist | ||
) |
Check the package conflicts in a database.
handle | the context handle |
pkglist | the list of packages to check |
Definition at line 209 of file conflict.c.
References _alpm_innerconflicts(), and CHECK_HANDLE.
alpm_list_t* alpm_checkdeps | ( | alpm_handle_t * | handle, |
alpm_list_t * | pkglist, | ||
alpm_list_t * | remove, | ||
alpm_list_t * | upgrade, | ||
int | reversedeps | ||
) |
Checks dependencies and returns missing ones in a list.
Dependencies can include versions with depmod operators.
handle | the context handle |
pkglist | the list of local packages |
remove | an alpm_list_t* of packages to be removed |
upgrade | an alpm_list_t* of packages to be upgraded (remove-then-upgrade) |
reversedeps | handles the backward dependencies |
Definition at line 266 of file deps.c.
References _alpm_log(), _alpm_pkg_find(), alpm_dep_compute_string(), alpm_list_add(), alpm_list_free(), ALPM_LOG_DEBUG, alpm_pkg_get_depends(), CHECK_HANDLE, __alpm_list_t::data, __alpm_pkg_t::name, __alpm_list_t::next, and __alpm_pkg_t::version.
Referenced by _alpm_remove_prepare(), _alpm_resolvedeps(), and _alpm_sync_prepare().
char* alpm_dep_compute_string | ( | const alpm_depend_t * | dep | ) |
Returns a newly allocated string representing the dependency information.
dep | a dependency info structure |
Returns a newly allocated string representing the dependency information.
The string must be freed!
dep | the depend to turn into a string |
Definition at line 820 of file deps.c.
References ALPM_DEP_MOD_ANY, ALPM_DEP_MOD_EQ, ALPM_DEP_MOD_GE, ALPM_DEP_MOD_GT, ALPM_DEP_MOD_LE, ALPM_DEP_MOD_LT, ASSERT, MALLOC, _alpm_depend_t::mod, _alpm_depend_t::name, and _alpm_depend_t::version.
Referenced by _alpm_local_db_write(), _alpm_resolvedeps(), alpm_checkdeps(), cb_question(), pacman_remove(), and sync_prepare_execute().
alpm_pkg_t* alpm_find_dbs_satisfier | ( | alpm_handle_t * | handle, |
alpm_list_t * | dbs, | ||
const char * | depstring | ||
) |
Find a package satisfying a specified dependency.
First look for a literal, going through each db one by one. Then look for providers. The first satisfier found is returned. The dependency can include versions with depmod operators.
handle | the context handle |
dbs | an alpm_list_t* of alpm_db_t where the satisfier will be searched |
depstring | package or provision name, versioned or not |
Definition at line 673 of file deps.c.
References _alpm_dep_free(), _alpm_splitdep(), ALPM_ERR_WRONG_ARGS, ASSERT, CHECK_HANDLE, and RET_ERR.
Referenced by main().
alpm_pkg_t* alpm_find_satisfier | ( | alpm_list_t * | pkgs, |
const char * | depstring | ||
) |
Find a package satisfying a specified dependency.
The dependency can include versions with depmod operators.
pkgs | an alpm_list_t* of alpm_pkg_t where the satisfier will be searched |
depstring | package or provision name, versioned or not |
Definition at line 246 of file deps.c.
References _alpm_dep_free(), and _alpm_splitdep().
Referenced by pacman_deptest().