libalpm
Arch Linux Package Manager Library
Data Structures | Modules | Typedefs | Enumerations | Functions
Public API

The libalpm Public API. More...

Collaboration diagram for Public API:

Data Structures

struct  _alpm_depend_t
 Dependency. More...
struct  _alpm_depmissing_t
 Missing dependency. More...
struct  _alpm_conflict_t
 Conflict. More...
struct  _alpm_fileconflict_t
 File conflict. More...
struct  _alpm_group_t
 Package group. More...
struct  _alpm_delta_t
 Package upgrade delta. More...
struct  _alpm_file_t
 File in a package. More...
struct  _alpm_filelist_t
 Package filelist container. More...
struct  _alpm_backup_t
 Local package or package file backup entry. More...
struct  _alpm_pgpkey_t
struct  _alpm_sigresult_t
 Signature result. More...
struct  _alpm_siglist_t
 Signature list. More...

Modules

 Options
 

Libalpm option getters and setters.


 Database Functions
 

Functions to query and manipulate the database of libalpm.


 Package Functions
 

Functions to manipulate libalpm packages.


 Transaction Functions
 

Functions to manipulate libalpm transactions.


 Dependency Functions
 

Functions dealing with libalpm representation of dependency information.


Typedefs

typedef int64_t alpm_time_t
typedef enum _alpm_pkgreason_t alpm_pkgreason_t
 Install reasons.
typedef enum _alpm_pkgfrom_t alpm_pkgfrom_t
typedef enum _alpm_depmod_t alpm_depmod_t
 Types of version constraints in dependency specs.
typedef enum
_alpm_fileconflicttype_t 
alpm_fileconflicttype_t
 File conflict type.
typedef enum _alpm_siglevel_t alpm_siglevel_t
 PGP signature verification options.
typedef enum _alpm_sigstatus_t alpm_sigstatus_t
 PGP signature verification status return codes.
typedef enum _alpm_sigvalidity_t alpm_sigvalidity_t
 PGP signature verification status return codes.
typedef struct __alpm_handle_t alpm_handle_t
typedef struct __alpm_db_t alpm_db_t
typedef struct __alpm_pkg_t alpm_pkg_t
typedef struct __alpm_trans_t alpm_trans_t
typedef struct _alpm_depend_t alpm_depend_t
 Dependency.
typedef struct _alpm_depmissing_t alpm_depmissing_t
 Missing dependency.
typedef struct _alpm_conflict_t alpm_conflict_t
 Conflict.
typedef struct _alpm_fileconflict_t alpm_fileconflict_t
 File conflict.
typedef struct _alpm_group_t alpm_group_t
 Package group.
typedef struct _alpm_delta_t alpm_delta_t
 Package upgrade delta.
typedef struct _alpm_file_t alpm_file_t
 File in a package.
typedef struct _alpm_filelist_t alpm_filelist_t
 Package filelist container.
typedef struct _alpm_backup_t alpm_backup_t
 Local package or package file backup entry.
typedef struct _alpm_pgpkey_t alpm_pgpkey_t
typedef struct _alpm_sigresult_t alpm_sigresult_t
 Signature result.
typedef struct _alpm_siglist_t alpm_siglist_t
 Signature list.
typedef enum _alpm_loglevel_t alpm_loglevel_t
 Logging Levels.
typedef void(* alpm_cb_log )(alpm_loglevel_t, const char *, va_list)
typedef enum _alpm_event_t alpm_event_t
 Events.
typedef void(* alpm_cb_event )(alpm_event_t, void *, void *)
 Event callback.
typedef enum _alpm_question_t alpm_question_t
 Questions.
typedef void(* alpm_cb_question )(alpm_question_t, void *, void *, void *, int *)
 Question callback.
typedef enum _alpm_progress_t alpm_progress_t
 Progress.
typedef void(* alpm_cb_progress )(alpm_progress_t, const char *, int, size_t, size_t)
 Progress callback.
typedef void(* alpm_cb_download )(const char *filename, off_t xfered, off_t total)
 Type of download progress callbacks.
typedef void(* alpm_cb_totaldl )(off_t total)
typedef int(* alpm_cb_fetch )(const char *url, const char *localpath, int force)
 A callback for downloading files.

Enumerations

enum  _alpm_pkgreason_t { ALPM_PKG_REASON_EXPLICIT = 0, ALPM_PKG_REASON_DEPEND = 1 }
 Install reasons. More...
enum  _alpm_pkgfrom_t { PKG_FROM_FILE = 1, PKG_FROM_LOCALDB, PKG_FROM_SYNCDB }
enum  _alpm_depmod_t {
  ALPM_DEP_MOD_ANY = 1, ALPM_DEP_MOD_EQ, ALPM_DEP_MOD_GE, ALPM_DEP_MOD_LE,
  ALPM_DEP_MOD_GT, ALPM_DEP_MOD_LT
}
 Types of version constraints in dependency specs. More...
enum  _alpm_fileconflicttype_t { ALPM_FILECONFLICT_TARGET = 1, ALPM_FILECONFLICT_FILESYSTEM }
 File conflict type. More...
enum  _alpm_siglevel_t {
  ALPM_SIG_PACKAGE = (1 << 0), ALPM_SIG_PACKAGE_OPTIONAL = (1 << 1), ALPM_SIG_PACKAGE_MARGINAL_OK = (1 << 2), ALPM_SIG_PACKAGE_UNKNOWN_OK = (1 << 3),
  ALPM_SIG_DATABASE = (1 << 10), ALPM_SIG_DATABASE_OPTIONAL = (1 << 11), ALPM_SIG_DATABASE_MARGINAL_OK = (1 << 12), ALPM_SIG_DATABASE_UNKNOWN_OK = (1 << 13),
  ALPM_SIG_USE_DEFAULT = (1 << 31)
}
 PGP signature verification options. More...
enum  _alpm_sigstatus_t {
  ALPM_SIGSTATUS_VALID, ALPM_SIGSTATUS_KEY_EXPIRED, ALPM_SIGSTATUS_SIG_EXPIRED, ALPM_SIGSTATUS_KEY_UNKNOWN,
  ALPM_SIGSTATUS_KEY_DISABLED, ALPM_SIGSTATUS_INVALID
}
 PGP signature verification status return codes. More...
enum  _alpm_sigvalidity_t { ALPM_SIGVALIDITY_FULL, ALPM_SIGVALIDITY_MARGINAL, ALPM_SIGVALIDITY_NEVER, ALPM_SIGVALIDITY_UNKNOWN }
 PGP signature verification status return codes. More...
enum  _alpm_loglevel_t { ALPM_LOG_ERROR = 1, ALPM_LOG_WARNING = (1 << 1), ALPM_LOG_DEBUG = (1 << 2), ALPM_LOG_FUNCTION = (1 << 3) }
 Logging Levels. More...
enum  _alpm_event_t {
  ALPM_EVENT_CHECKDEPS_START = 1, ALPM_EVENT_CHECKDEPS_DONE, ALPM_EVENT_FILECONFLICTS_START, ALPM_EVENT_FILECONFLICTS_DONE,
  ALPM_EVENT_RESOLVEDEPS_START, ALPM_EVENT_RESOLVEDEPS_DONE, ALPM_EVENT_INTERCONFLICTS_START, ALPM_EVENT_INTERCONFLICTS_DONE,
  ALPM_EVENT_ADD_START, ALPM_EVENT_ADD_DONE, ALPM_EVENT_REMOVE_START, ALPM_EVENT_REMOVE_DONE,
  ALPM_EVENT_UPGRADE_START, ALPM_EVENT_UPGRADE_DONE, ALPM_EVENT_INTEGRITY_START, ALPM_EVENT_INTEGRITY_DONE,
  ALPM_EVENT_LOAD_START, ALPM_EVENT_LOAD_DONE, ALPM_EVENT_DELTA_INTEGRITY_START, ALPM_EVENT_DELTA_INTEGRITY_DONE,
  ALPM_EVENT_DELTA_PATCHES_START, ALPM_EVENT_DELTA_PATCHES_DONE, ALPM_EVENT_DELTA_PATCH_START, ALPM_EVENT_DELTA_PATCH_DONE,
  ALPM_EVENT_DELTA_PATCH_FAILED, ALPM_EVENT_SCRIPTLET_INFO, ALPM_EVENT_RETRIEVE_START, ALPM_EVENT_DISKSPACE_START,
  ALPM_EVENT_DISKSPACE_DONE
}
 Events. More...
enum  _alpm_question_t {
  ALPM_QUESTION_INSTALL_IGNOREPKG = 1, ALPM_QUESTION_REPLACE_PKG = (1 << 1), ALPM_QUESTION_CONFLICT_PKG = (1 << 2), ALPM_QUESTION_CORRUPTED_PKG = (1 << 3),
  ALPM_QUESTION_LOCAL_NEWER = (1 << 4), ALPM_QUESTION_REMOVE_PKGS = (1 << 5), ALPM_QUESTION_SELECT_PROVIDER = (1 << 6), ALPM_QUESTION_IMPORT_KEY = (1 << 7)
}
 Questions. More...
enum  _alpm_progress_t {
  ALPM_PROGRESS_ADD_START, ALPM_PROGRESS_UPGRADE_START, ALPM_PROGRESS_REMOVE_START, ALPM_PROGRESS_CONFLICTS_START,
  ALPM_PROGRESS_DISKSPACE_START, ALPM_PROGRESS_INTEGRITY_START, ALPM_PROGRESS_LOAD_START
}
 Progress. More...

Functions

int alpm_logaction (alpm_handle_t *handle, const char *fmt,...)
 A printf-like function for logging.
char * alpm_fetch_pkgurl (alpm_handle_t *handle, const char *url)
 Fetch a remote pkg.
int alpm_pkg_check_pgp_signature (alpm_pkg_t *pkg, alpm_siglist_t *siglist)
 Check the PGP signature for the given package file.
int alpm_db_check_pgp_signature (alpm_db_t *db, alpm_siglist_t *siglist)
 Check the PGP signature for the given database.
int alpm_siglist_cleanup (alpm_siglist_t *siglist)
 Clean up and free a signature result list.
alpm_list_talpm_find_group_pkgs (alpm_list_t *dbs, const char *name)
 Find group members across a list of databases.
alpm_pkg_talpm_sync_newversion (alpm_pkg_t *pkg, alpm_list_t *dbs_sync)
 Check for new version of pkg in sync repos (only the first occurrence is considered in sync)

Common Transactions

int alpm_sync_sysupgrade (alpm_handle_t *handle, int enable_downgrade)
 Search for packages to upgrade and add them to the transaction.
int alpm_add_pkg (alpm_handle_t *handle, alpm_pkg_t *pkg)
 Add a package to the transaction.
int alpm_remove_pkg (alpm_handle_t *handle, alpm_pkg_t *pkg)
 Add a package removal action to the transaction.

Detailed Description

The libalpm Public API.


Typedef Documentation

typedef struct _alpm_backup_t alpm_backup_t

Local package or package file backup entry.

typedef void(* alpm_cb_download)(const char *filename, off_t xfered, off_t total)

Type of download progress callbacks.

Parameters:
filenamethe name of the file being downloaded
xferedthe number of transferred bytes
totalthe total number of bytes to transfer

Definition at line 393 of file alpm.h.

typedef void(* alpm_cb_event)(alpm_event_t, void *, void *)

Event callback.

Definition at line 353 of file alpm.h.

typedef int(* alpm_cb_fetch)(const char *url, const char *localpath, int force)

A callback for downloading files.

Parameters:
urlthe URL of the file to be downloaded
localpaththe directory to which the file should be downloaded
forcewhether to force an update, even if the file is the same
Returns:
0 on success, 1 if the file exists and is identical, -1 on error.

Definition at line 405 of file alpm.h.

typedef void(* alpm_cb_log)(alpm_loglevel_t, const char *, va_list)

Definition at line 265 of file alpm.h.

typedef void(* alpm_cb_progress)(alpm_progress_t, const char *, int, size_t, size_t)

Progress callback.

Definition at line 382 of file alpm.h.

typedef void(* alpm_cb_question)(alpm_question_t, void *, void *, void *, int *)

Question callback.

Definition at line 368 of file alpm.h.

typedef void(* alpm_cb_totaldl)(off_t total)

Definition at line 396 of file alpm.h.

Conflict.

typedef struct __alpm_db_t alpm_db_t

Definition at line 141 of file alpm.h.

typedef struct _alpm_delta_t alpm_delta_t

Package upgrade delta.

typedef struct _alpm_depend_t alpm_depend_t

Dependency.

Missing dependency.

Types of version constraints in dependency specs.

Events.

NULL parameters are passed to in all events unless specified otherwise.

typedef struct _alpm_file_t alpm_file_t

File in a package.

File conflict.

File conflict type.

Whether the conflict results from a file existing on the filesystem, or with another target in the transaction.

Package filelist container.

typedef struct _alpm_group_t alpm_group_t

Package group.

Definition at line 140 of file alpm.h.

Logging Levels.

typedef struct _alpm_pgpkey_t alpm_pgpkey_t
typedef struct __alpm_pkg_t alpm_pkg_t

Definition at line 142 of file alpm.h.

Install reasons.

Why the package was installed.

Progress.

Questions.

PGP signature verification options.

Signature list.

Contains the number of signatures found and a pointer to an array of results. The array is of size count.

Signature result.

Contains the key, status, and validity of a given signature.

PGP signature verification status return codes.

PGP signature verification status return codes.

typedef int64_t alpm_time_t

Definition at line 47 of file alpm.h.

typedef struct __alpm_trans_t alpm_trans_t

Definition at line 143 of file alpm.h.


Enumeration Type Documentation

Types of version constraints in dependency specs.

Enumerator:
ALPM_DEP_MOD_ANY 

No version constraint.

ALPM_DEP_MOD_EQ 

Test version equality (package=x.y.z)

ALPM_DEP_MOD_GE 

Test for at least a version (package>=x.y.z)

ALPM_DEP_MOD_LE 

Test for at most a version (package<=x.y.z)

ALPM_DEP_MOD_GT 

Test for greater than some version (package>x.y.z)

ALPM_DEP_MOD_LT 

Test for less than some version (package<x.y.z)

Definition at line 72 of file alpm.h.

Events.

NULL parameters are passed to in all events unless specified otherwise.

Enumerator:
ALPM_EVENT_CHECKDEPS_START 

Dependencies will be computed for a package.

ALPM_EVENT_CHECKDEPS_DONE 

Dependencies were computed for a package.

ALPM_EVENT_FILECONFLICTS_START 

File conflicts will be computed for a package.

ALPM_EVENT_FILECONFLICTS_DONE 

File conflicts were computed for a package.

ALPM_EVENT_RESOLVEDEPS_START 

Dependencies will be resolved for target package.

ALPM_EVENT_RESOLVEDEPS_DONE 

Dependencies were resolved for target package.

ALPM_EVENT_INTERCONFLICTS_START 

Inter-conflicts will be checked for target package.

ALPM_EVENT_INTERCONFLICTS_DONE 

Inter-conflicts were checked for target package.

ALPM_EVENT_ADD_START 

Package will be installed.

A pointer to the target package is passed to the callback.

ALPM_EVENT_ADD_DONE 

Package was installed.

A pointer to the new package is passed to the callback.

ALPM_EVENT_REMOVE_START 

Package will be removed.

A pointer to the target package is passed to the callback.

ALPM_EVENT_REMOVE_DONE 

Package was removed.

A pointer to the removed package is passed to the callback.

ALPM_EVENT_UPGRADE_START 

Package will be upgraded.

A pointer to the upgraded package is passed to the callback.

ALPM_EVENT_UPGRADE_DONE 

Package was upgraded.

A pointer to the new package, and a pointer to the old package is passed to the callback, respectively.

ALPM_EVENT_INTEGRITY_START 

Target package's integrity will be checked.

ALPM_EVENT_INTEGRITY_DONE 

Target package's integrity was checked.

ALPM_EVENT_LOAD_START 

Target package will be loaded.

ALPM_EVENT_LOAD_DONE 

Target package is finished loading.

ALPM_EVENT_DELTA_INTEGRITY_START 

Target deltas's integrity will be checked.

ALPM_EVENT_DELTA_INTEGRITY_DONE 

Target delta's integrity was checked.

ALPM_EVENT_DELTA_PATCHES_START 

Deltas will be applied to packages.

ALPM_EVENT_DELTA_PATCHES_DONE 

Deltas were applied to packages.

ALPM_EVENT_DELTA_PATCH_START 

Delta patch will be applied to target package.

The filename of the package and the filename of the patch is passed to the callback.

ALPM_EVENT_DELTA_PATCH_DONE 

Delta patch was applied to target package.

ALPM_EVENT_DELTA_PATCH_FAILED 

Delta patch failed to apply to target package.

ALPM_EVENT_SCRIPTLET_INFO 

Scriptlet has printed information.

A line of text is passed to the callback.

ALPM_EVENT_RETRIEVE_START 

Files will be downloaded from a repository.

The repository's tree name is passed to the callback.

ALPM_EVENT_DISKSPACE_START 

Disk space usage will be computed for a package.

ALPM_EVENT_DISKSPACE_DONE 

Disk space usage was computed for a package.

Definition at line 271 of file alpm.h.

File conflict type.

Whether the conflict results from a file existing on the filesystem, or with another target in the transaction.

Enumerator:
ALPM_FILECONFLICT_TARGET 
ALPM_FILECONFLICT_FILESYSTEM 

Definition at line 92 of file alpm.h.

Logging Levels.

Enumerator:
ALPM_LOG_ERROR 
ALPM_LOG_WARNING 
ALPM_LOG_DEBUG 
ALPM_LOG_FUNCTION 

Definition at line 258 of file alpm.h.

Enumerator:
PKG_FROM_FILE 
PKG_FROM_LOCALDB 
PKG_FROM_SYNCDB 

Definition at line 65 of file alpm.h.

Install reasons.

Why the package was installed.

Enumerator:
ALPM_PKG_REASON_EXPLICIT 

Explicitly requested by the user.

ALPM_PKG_REASON_DEPEND 

Installed as a dependency for another package.

Definition at line 58 of file alpm.h.

Progress.

Enumerator:
ALPM_PROGRESS_ADD_START 
ALPM_PROGRESS_UPGRADE_START 
ALPM_PROGRESS_REMOVE_START 
ALPM_PROGRESS_CONFLICTS_START 
ALPM_PROGRESS_DISKSPACE_START 
ALPM_PROGRESS_INTEGRITY_START 
ALPM_PROGRESS_LOAD_START 

Definition at line 371 of file alpm.h.

Questions.

Enumerator:
ALPM_QUESTION_INSTALL_IGNOREPKG 
ALPM_QUESTION_REPLACE_PKG 
ALPM_QUESTION_CONFLICT_PKG 
ALPM_QUESTION_CORRUPTED_PKG 
ALPM_QUESTION_LOCAL_NEWER 
ALPM_QUESTION_REMOVE_PKGS 
ALPM_QUESTION_SELECT_PROVIDER 
ALPM_QUESTION_IMPORT_KEY 

Definition at line 356 of file alpm.h.

PGP signature verification options.

Enumerator:
ALPM_SIG_PACKAGE 
ALPM_SIG_PACKAGE_OPTIONAL 
ALPM_SIG_PACKAGE_MARGINAL_OK 
ALPM_SIG_PACKAGE_UNKNOWN_OK 
ALPM_SIG_DATABASE 
ALPM_SIG_DATABASE_OPTIONAL 
ALPM_SIG_DATABASE_MARGINAL_OK 
ALPM_SIG_DATABASE_UNKNOWN_OK 
ALPM_SIG_USE_DEFAULT 

Definition at line 100 of file alpm.h.

PGP signature verification status return codes.

Enumerator:
ALPM_SIGSTATUS_VALID 
ALPM_SIGSTATUS_KEY_EXPIRED 
ALPM_SIGSTATUS_SIG_EXPIRED 
ALPM_SIGSTATUS_KEY_UNKNOWN 
ALPM_SIGSTATUS_KEY_DISABLED 
ALPM_SIGSTATUS_INVALID 

Definition at line 117 of file alpm.h.

PGP signature verification status return codes.

Enumerator:
ALPM_SIGVALIDITY_FULL 
ALPM_SIGVALIDITY_MARGINAL 
ALPM_SIGVALIDITY_NEVER 
ALPM_SIGVALIDITY_UNKNOWN 

Definition at line 129 of file alpm.h.


Function Documentation

int alpm_add_pkg ( alpm_handle_t handle,
alpm_pkg_t pkg 
)

Add a package to the transaction.

If the package was loaded by alpm_pkg_load(), it will be freed upon alpm_trans_release() invocation.

Parameters:
handlethe context handle
pkgthe package to add
Returns:
0 on success, -1 on error (pm_errno is set accordingly)

Definition at line 50 of file add.c.

References _, _alpm_db_get_pkgfromcache(), _alpm_log(), _alpm_pkg_compare_versions(), _alpm_pkg_find(), __alpm_trans_t::add, ALPM_ERR_TRANS_DUP_TARGET, ALPM_ERR_TRANS_NOT_INITIALIZED, ALPM_ERR_TRANS_NULL, ALPM_ERR_WRONG_ARGS, alpm_list_add(), ALPM_LOG_DEBUG, ALPM_LOG_WARNING, ALPM_PKG_REASON_EXPLICIT, ALPM_TRANS_FLAG_DOWNLOADONLY, ALPM_TRANS_FLAG_NEEDED, ASSERT, CHECK_HANDLE, __alpm_handle_t::db_local, __alpm_trans_t::flags, __alpm_pkg_t::handle, __alpm_pkg_t::name, __alpm_pkg_t::reason, RET_ERR, __alpm_trans_t::state, STATE_INITIALIZED, __alpm_handle_t::trans, and __alpm_pkg_t::version.

Referenced by pacman_upgrade().

Here is the call graph for this function:

Here is the caller graph for this function:

int alpm_db_check_pgp_signature ( alpm_db_t db,
alpm_siglist_t siglist 
)

Check the PGP signature for the given database.

Parameters:
dbthe database to check
siglista pointer to storage for signature results
Returns:
a int value : 0 (valid), 1 (invalid), -1 (an error occurred)

Definition at line 886 of file signing.c.

References _alpm_db_path(), _alpm_gpgme_checksig(), ALPM_ERR_WRONG_ARGS, ASSERT, __alpm_db_t::handle, __alpm_handle_t::pm_errno, and RET_ERR.

Here is the call graph for this function:

char* alpm_fetch_pkgurl ( alpm_handle_t handle,
const char *  url 
)

Fetch a remote pkg.

Parameters:
handlethe context handle
urlURL of the package to download
Returns:
the downloaded filepath on success, NULL on error

Definition at line 562 of file dload.c.

References _, _alpm_dload_payload_reset(), _alpm_download(), _alpm_filecache_find(), _alpm_filecache_setup(), _alpm_log(), dload_payload::allow_resume, ALPM_ERR_MEMORY, ALPM_ERR_WRONG_ARGS, ALPM_LOG_DEBUG, ALPM_LOG_WARNING, ALPM_SIG_PACKAGE, ALPM_SIG_PACKAGE_OPTIONAL, ASSERT, CHECK_HANDLE, dload_payload::errors_ok, dload_payload::fileurl, dload_payload::force, FREE, dload_payload::handle, handle, MALLOC, dload_payload::max_size, RET_ERR, __alpm_handle_t::siglevel, and STRDUP.

Referenced by pacman_upgrade().

Here is the call graph for this function:

Here is the caller graph for this function:

alpm_list_t* alpm_find_group_pkgs ( alpm_list_t dbs,
const char *  name 
)

Find group members across a list of databases.

If a member exists in several databases, only the first database is used. IgnorePkg is also handled.

Parameters:
dbsthe list of alpm_db_t *
namethe name of the group
Returns:
the list of alpm_pkg_t * (caller is responsible for alpm_list_free)

Definition at line 244 of file lib/libalpm/sync.c.

References _alpm_pkg_find(), _alpm_pkg_should_ignore(), alpm_db_readgroup(), alpm_list_add(), alpm_list_free(), ALPM_QUESTION_INSTALL_IGNOREPKG, __alpm_list_t::data, __alpm_db_t::handle, __alpm_pkg_t::name, __alpm_list_t::next, _alpm_group_t::packages, and QUESTION.

Here is the call graph for this function:

int alpm_logaction ( alpm_handle_t handle,
const char *  fmt,
  ... 
)

A printf-like function for logging.

Parameters:
handlethe context handle
fmtoutput format
Returns:
0 on success, -1 on error (pm_errno is set accordingly)

Definition at line 41 of file log.c.

References _alpm_logaction(), ALPM_ERR_BADPERMS, ALPM_ERR_NOT_A_DIR, ALPM_ERR_SYSTEM, ASSERT, __alpm_handle_t::logfile, __alpm_handle_t::logstream, and __alpm_handle_t::pm_errno.

Referenced by _alpm_run_chroot(), alpm_trans_release(), cb_event(), and pacman_sync().

Here is the call graph for this function:

Here is the caller graph for this function:

int alpm_pkg_check_pgp_signature ( alpm_pkg_t pkg,
alpm_siglist_t siglist 
)

Check the PGP signature for the given package file.

Parameters:
pkgthe package to check
siglista pointer to storage for signature results
Returns:
a int value : 0 (valid), 1 (invalid), -1 (an error occurred)

Definition at line 869 of file signing.c.

References _alpm_gpgme_checksig(), ALPM_ERR_WRONG_ARGS, ASSERT, __alpm_pkg_t::base64_sig, __alpm_pkg_t::filename, __alpm_pkg_t::handle, __alpm_handle_t::pm_errno, and RET_ERR.

Referenced by dump_pkg_full().

Here is the call graph for this function:

Here is the caller graph for this function:

int alpm_remove_pkg ( alpm_handle_t handle,
alpm_pkg_t pkg 
)

Add a package removal action to the transaction.

Parameters:
handlethe context handle
pkgthe package to uninstall
Returns:
0 on success, -1 on error (pm_errno is set accordingly)

Definition at line 46 of file lib/libalpm/remove.c.

References _alpm_log(), _alpm_pkg_dup(), _alpm_pkg_find(), ALPM_ERR_TRANS_DUP_TARGET, ALPM_ERR_TRANS_NOT_INITIALIZED, ALPM_ERR_TRANS_NULL, ALPM_ERR_WRONG_ARGS, alpm_list_add(), ALPM_LOG_DEBUG, ASSERT, CHECK_HANDLE, __alpm_pkg_t::handle, __alpm_pkg_t::name, __alpm_trans_t::remove, RET_ERR, __alpm_trans_t::state, STATE_INITIALIZED, and __alpm_handle_t::trans.

Here is the call graph for this function:

Clean up and free a signature result list.

Note that this does not free the siglist object itself in case that was allocated on the stack; this is the responsibility of the caller.

Parameters:
siglista pointer to storage for signature results
Returns:
0 on success, -1 on error

Definition at line 903 of file signing.c.

References ASSERT, _alpm_siglist_t::count, _alpm_pgpkey_t::data, _alpm_pgpkey_t::fingerprint, _alpm_sigresult_t::key, and _alpm_siglist_t::results.

Referenced by _alpm_check_pgp_helper(), and dump_pkg_full().

Here is the caller graph for this function:

alpm_pkg_t* alpm_sync_newversion ( alpm_pkg_t pkg,
alpm_list_t dbs_sync 
)

Check for new version of pkg in sync repos (only the first occurrence is considered in sync)

Definition at line 54 of file lib/libalpm/sync.c.

References _alpm_db_get_pkgfromcache(), _alpm_log(), _alpm_pkg_compare_versions(), ALPM_LOG_DEBUG, ASSERT, __alpm_pkg_t::handle, __alpm_pkg_t::name, __alpm_list_t::next, __alpm_handle_t::pm_errno, and __alpm_pkg_t::version.

Here is the call graph for this function:

int alpm_sync_sysupgrade ( alpm_handle_t handle,
int  enable_downgrade 
)

Search for packages to upgrade and add them to the transaction.

Parameters:
handlethe context handle
enable_downgradeallow downgrading of packages if the remote version is lower
Returns:
0 on success, -1 on error (pm_errno is set accordingly)

Definition at line 192 of file lib/libalpm/sync.c.

References _alpm_db_get_pkgcache(), _alpm_db_get_pkgfromcache(), _alpm_log(), _alpm_pkg_find(), __alpm_trans_t::add, ALPM_ERR_TRANS_NOT_INITIALIZED, ALPM_ERR_TRANS_NULL, alpm_list_add(), alpm_list_join(), ALPM_LOG_DEBUG, ASSERT, CHECK_HANDLE, __alpm_list_t::data, __alpm_handle_t::db_local, __alpm_handle_t::dbs_sync, __alpm_pkg_t::name, __alpm_list_t::next, RET_ERR, __alpm_trans_t::state, STATE_INITIALIZED, and __alpm_handle_t::trans.

Here is the call graph for this function: