libalpm
Arch Linux Package Manager Library
deps.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "deps.h"
#include "alpm_list.h"
#include "util.h"
#include "log.h"
#include "graph.h"
#include "package.h"
#include "db.h"
#include "handle.h"
#include "trans.h"
Include dependency graph for deps.c:

Functions

void alpm_dep_free (alpm_depend_t *dep)
 Free a dependency info structure.
 
static alpm_depmissing_tdepmiss_new (const char *target, alpm_depend_t *dep, const char *causingpkg)
 
void alpm_depmissing_free (alpm_depmissing_t *miss)
 Free a depmissing and its members.
 
static alpm_pkg_t * find_dep_satisfier (alpm_list_t *pkgs, alpm_depend_t *dep)
 
static alpm_list_tdep_graph_init (alpm_handle_t *handle, alpm_list_t *targets, alpm_list_t *ignore)
 
static int no_dep_version (alpm_handle_t *handle)
 
alpm_pkg_t * alpm_find_satisfier (alpm_list_t *pkgs, const char *depstring)
 Find a package satisfying a specified dependency.
 
alpm_list_talpm_checkdeps (alpm_handle_t *handle, alpm_list_t *pkglist, alpm_list_t *rem, alpm_list_t *upgrade, int reversedeps)
 Checks dependencies and returns missing ones in a list.
 
static int dep_vercmp (const char *version1, alpm_depmod_t mod, const char *version2)
 
alpm_depend_talpm_dep_from_string (const char *depstring)
 Return a newly allocated dependency information parsed from a string should be used to free the dependency .
 
static alpm_pkg_t * resolvedep (alpm_handle_t *handle, alpm_depend_t *dep, alpm_list_t *dbs, alpm_list_t *excluding, int prompt)
 helper function for resolvedeps: search for dep satisfier in dbs
 
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.
 
char * alpm_dep_compute_string (const alpm_depend_t *dep)
 Returns a newly allocated string representing the dependency information.
 

Function Documentation

◆ dep_graph_init()

◆ dep_vercmp()

static int dep_vercmp ( const char * version1,
alpm_depmod_t mod,
const char * version2 )
static

◆ depmiss_new()

static alpm_depmissing_t * depmiss_new ( const char * target,
alpm_depend_t * dep,
const char * causingpkg )
static

◆ find_dep_satisfier()

static alpm_pkg_t * find_dep_satisfier ( alpm_list_t * pkgs,
alpm_depend_t * dep )
static

◆ no_dep_version()

static int no_dep_version ( alpm_handle_t * handle)
static

References ALPM_TRANS_FLAG_NODEPVERSION.

Referenced by alpm_checkdeps().

◆ resolvedep()

static alpm_pkg_t * resolvedep ( alpm_handle_t * handle,
alpm_depend_t * dep,
alpm_list_t * dbs,
alpm_list_t * excluding,
int prompt )
static

helper function for resolvedeps: search for dep satisfier in dbs

Parameters
handlethe context handle
depis the dependency to search for
dbsare the databases to search
excludingare the packages to exclude from the search
promptif true, ask an alpm_question_install_ignorepkg_t to decide if ignored packages should be installed; if false, skip ignored packages.
Returns
the resolved package

References _, ALPM_DB_USAGE_INSTALL, ALPM_DB_USAGE_UPGRADE, ALPM_ERR_PKG_IGNORED, ALPM_ERR_PKG_NOT_FOUND, alpm_list_add(), alpm_list_count(), alpm_list_free(), alpm_list_nth(), ALPM_LOG_DEBUG, ALPM_LOG_WARNING, alpm_pkg_find(), alpm_pkg_get_provides(), alpm_pkg_should_ignore(), ALPM_QUESTION_INSTALL_IGNOREPKG, ALPM_QUESTION_SELECT_PROVIDER, alpm_list_t::data, alpm_question_install_ignorepkg_t::install, alpm_depend_t::name, alpm_depend_t::name_hash, alpm_list_t::next, QUESTION, alpm_question_install_ignorepkg_t::type, alpm_question_select_provider_t::type, and alpm_question_select_provider_t::use_index.

Referenced by alpm_find_dbs_satisfier().