libalpm
Arch Linux Package Manager Library
Data Structures | Defines | Typedefs | Enumerations | Functions
alpm.h File Reference
#include <stdint.h>
#include <sys/types.h>
#include <stdarg.h>
#include <alpm_list.h>
Include dependency graph for alpm.h:

Go to the source code of this file.

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...

Defines

#define DEPRECATED   __attribute__((deprecated))

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.
typedef enum _alpm_transflag_t alpm_transflag_t
 Transaction flags.
typedef enum _alpm_errno_t alpm_errno_t

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...
enum  _alpm_transflag_t {
  ALPM_TRANS_FLAG_NODEPS = 1, ALPM_TRANS_FLAG_FORCE = (1 << 1), ALPM_TRANS_FLAG_NOSAVE = (1 << 2), ALPM_TRANS_FLAG_NODEPVERSION = (1 << 3),
  ALPM_TRANS_FLAG_CASCADE = (1 << 4), ALPM_TRANS_FLAG_RECURSE = (1 << 5), ALPM_TRANS_FLAG_DBONLY = (1 << 6), ALPM_TRANS_FLAG_ALLDEPS = (1 << 8),
  ALPM_TRANS_FLAG_DOWNLOADONLY = (1 << 9), ALPM_TRANS_FLAG_NOSCRIPTLET = (1 << 10), ALPM_TRANS_FLAG_NOCONFLICTS = (1 << 11), ALPM_TRANS_FLAG_NEEDED = (1 << 13),
  ALPM_TRANS_FLAG_ALLEXPLICIT = (1 << 14), ALPM_TRANS_FLAG_UNNEEDED = (1 << 15), ALPM_TRANS_FLAG_RECURSEALL = (1 << 16), ALPM_TRANS_FLAG_NOLOCK = (1 << 17)
}
 Transaction flags. More...
enum  _alpm_errno_t {
  ALPM_ERR_MEMORY = 1, ALPM_ERR_SYSTEM, ALPM_ERR_BADPERMS, ALPM_ERR_NOT_A_FILE,
  ALPM_ERR_NOT_A_DIR, ALPM_ERR_WRONG_ARGS, ALPM_ERR_DISK_SPACE, ALPM_ERR_HANDLE_NULL,
  ALPM_ERR_HANDLE_NOT_NULL, ALPM_ERR_HANDLE_LOCK, ALPM_ERR_DB_OPEN, ALPM_ERR_DB_CREATE,
  ALPM_ERR_DB_NULL, ALPM_ERR_DB_NOT_NULL, ALPM_ERR_DB_NOT_FOUND, ALPM_ERR_DB_INVALID,
  ALPM_ERR_DB_INVALID_SIG, ALPM_ERR_DB_VERSION, ALPM_ERR_DB_WRITE, ALPM_ERR_DB_REMOVE,
  ALPM_ERR_SERVER_BAD_URL, ALPM_ERR_SERVER_NONE, ALPM_ERR_TRANS_NOT_NULL, ALPM_ERR_TRANS_NULL,
  ALPM_ERR_TRANS_DUP_TARGET, ALPM_ERR_TRANS_NOT_INITIALIZED, ALPM_ERR_TRANS_NOT_PREPARED, ALPM_ERR_TRANS_ABORT,
  ALPM_ERR_TRANS_TYPE, ALPM_ERR_TRANS_NOT_LOCKED, ALPM_ERR_PKG_NOT_FOUND, ALPM_ERR_PKG_IGNORED,
  ALPM_ERR_PKG_INVALID, ALPM_ERR_PKG_INVALID_CHECKSUM, ALPM_ERR_PKG_INVALID_SIG, ALPM_ERR_PKG_OPEN,
  ALPM_ERR_PKG_CANT_REMOVE, ALPM_ERR_PKG_INVALID_NAME, ALPM_ERR_PKG_INVALID_ARCH, ALPM_ERR_PKG_REPO_NOT_FOUND,
  ALPM_ERR_SIG_MISSING, ALPM_ERR_SIG_INVALID, ALPM_ERR_DLT_INVALID, ALPM_ERR_DLT_PATCHFAILED,
  ALPM_ERR_UNSATISFIED_DEPS, ALPM_ERR_CONFLICTING_DEPS, ALPM_ERR_FILE_CONFLICTS, ALPM_ERR_RETRIEVE,
  ALPM_ERR_INVALID_REGEX, ALPM_ERR_LIBARCHIVE, ALPM_ERR_LIBCURL, ALPM_ERR_EXTERNAL_DOWNLOAD,
  ALPM_ERR_GPGME
}
enum  alpm_caps { ALPM_CAPABILITY_NLS = (1 << 0), ALPM_CAPABILITY_DOWNLOADER = (1 << 1), ALPM_CAPABILITY_SIGNATURES = (1 << 2) }

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.
alpm_cb_log alpm_option_get_logcb (alpm_handle_t *handle)
 Returns the callback used for logging.
int alpm_option_set_logcb (alpm_handle_t *handle, alpm_cb_log cb)
 Sets the callback used for logging.
alpm_cb_download alpm_option_get_dlcb (alpm_handle_t *handle)
 Returns the callback used to report download progress.
int alpm_option_set_dlcb (alpm_handle_t *handle, alpm_cb_download cb)
 Sets the callback used to report download progress.
alpm_cb_fetch alpm_option_get_fetchcb (alpm_handle_t *handle)
 Returns the downloading callback.
int alpm_option_set_fetchcb (alpm_handle_t *handle, alpm_cb_fetch cb)
 Sets the downloading callback.
alpm_cb_totaldl alpm_option_get_totaldlcb (alpm_handle_t *handle)
 Returns the callback used to report total download size.
int alpm_option_set_totaldlcb (alpm_handle_t *handle, alpm_cb_totaldl cb)
 Sets the callback used to report total download size.
alpm_cb_event alpm_option_get_eventcb (alpm_handle_t *handle)
 Returns the callback used for events.
int alpm_option_set_eventcb (alpm_handle_t *handle, alpm_cb_event cb)
 Sets the callback used for events.
alpm_cb_question alpm_option_get_questioncb (alpm_handle_t *handle)
 Returns the callback used for questions.
int alpm_option_set_questioncb (alpm_handle_t *handle, alpm_cb_question cb)
 Sets the callback used for questions.
alpm_cb_progress alpm_option_get_progresscb (alpm_handle_t *handle)
 Returns the callback used for operation progress.
int alpm_option_set_progresscb (alpm_handle_t *handle, alpm_cb_progress cb)
 Sets the callback used for operation progress.
const char * alpm_option_get_root (alpm_handle_t *handle)
 Returns the root of the destination filesystem.
const char * alpm_option_get_dbpath (alpm_handle_t *handle)
 Returns the path to the database directory.
const char * alpm_option_get_lockfile (alpm_handle_t *handle)
 Get the name of the database lock file.
const char * alpm_option_get_logfile (alpm_handle_t *handle)
 Returns the logfile name.
int alpm_option_set_logfile (alpm_handle_t *handle, const char *logfile)
 Sets the logfile name.
const char * alpm_option_get_gpgdir (alpm_handle_t *handle)
 Returns the path to libalpm's GnuPG home directory.
int alpm_option_set_gpgdir (alpm_handle_t *handle, const char *gpgdir)
 Sets the path to libalpm's GnuPG home directory.
int alpm_option_get_usesyslog (alpm_handle_t *handle)
 Returns whether to use syslog (0 is FALSE, TRUE otherwise).
int alpm_option_set_usesyslog (alpm_handle_t *handle, int usesyslog)
 Sets whether to use syslog (0 is FALSE, TRUE otherwise).
const char * alpm_option_get_arch (alpm_handle_t *handle)
 Returns the targeted architecture.
int alpm_option_set_arch (alpm_handle_t *handle, const char *arch)
 Sets the targeted architecture.
int alpm_option_get_usedelta (alpm_handle_t *handle)
int alpm_option_set_usedelta (alpm_handle_t *handle, int usedelta)
int alpm_option_get_checkspace (alpm_handle_t *handle)
int alpm_option_set_checkspace (alpm_handle_t *handle, int checkspace)
alpm_siglevel_t alpm_option_get_default_siglevel (alpm_handle_t *handle)
int alpm_option_set_default_siglevel (alpm_handle_t *handle, alpm_siglevel_t level)
alpm_db_talpm_option_get_localdb (alpm_handle_t *handle)
 Get the database of locally installed packages.
alpm_list_talpm_option_get_syncdbs (alpm_handle_t *handle)
 Get the list of sync databases.
alpm_db_talpm_db_register_sync (alpm_handle_t *handle, const char *treename, alpm_siglevel_t level)
 Register a sync database of packages.
int alpm_db_unregister (alpm_db_t *db)
 Unregister a package database.
int alpm_db_unregister_all (alpm_handle_t *handle)
 Unregister all package databases.
const char * alpm_db_get_name (const alpm_db_t *db)
 Get the name of a package database.
alpm_siglevel_t alpm_db_get_siglevel (alpm_db_t *db)
 Get the signature verification level for a database.
int alpm_db_get_valid (alpm_db_t *db)
 Check the validity of a database.
int alpm_db_update (int level, alpm_db_t *db)
 Update a package database.
alpm_pkg_talpm_db_get_pkg (alpm_db_t *db, const char *name)
 Get a package entry from a package database.
alpm_list_talpm_db_get_pkgcache (alpm_db_t *db)
 Get the package cache of a package database.
alpm_group_talpm_db_readgroup (alpm_db_t *db, const char *name)
 Get a group entry from a package database.
alpm_list_talpm_db_get_groupcache (alpm_db_t *db)
 Get the group cache of a package database.
alpm_list_talpm_db_search (alpm_db_t *db, const alpm_list_t *needles)
 Searches a database with regular expressions.
int alpm_db_set_pkgreason (alpm_handle_t *handle, alpm_pkg_t *pkg, alpm_pkgreason_t reason)
 Set install reason for a package in db.
int alpm_pkg_load (alpm_handle_t *handle, const char *filename, int full, alpm_siglevel_t level, alpm_pkg_t **pkg)
 Create a package from a file.
int alpm_pkg_free (alpm_pkg_t *pkg)
 Free a package.
int alpm_pkg_checkmd5sum (alpm_pkg_t *pkg)
 Check the integrity (with md5) of a package from the sync cache.
int alpm_pkg_vercmp (const char *a, const char *b)
 Compare two version strings and determine which one is 'newer'.
alpm_list_talpm_pkg_compute_requiredby (alpm_pkg_t *pkg)
 Computes the list of packages requiring a given package.
void * alpm_pkg_changelog_open (alpm_pkg_t *pkg)
 Open a package changelog for reading.
size_t alpm_pkg_changelog_read (void *ptr, size_t size, const alpm_pkg_t *pkg, void *fp)
 Read data from an open changelog 'file stream'.
int alpm_pkg_changelog_close (const alpm_pkg_t *pkg, void *fp)
 Close a package changelog for reading.
int alpm_pkg_has_scriptlet (alpm_pkg_t *pkg)
 Returns whether the package has an install scriptlet.
off_t alpm_pkg_download_size (alpm_pkg_t *newpkg)
 Returns the size of download.
alpm_list_talpm_pkg_unused_deltas (alpm_pkg_t *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)
alpm_transflag_t alpm_trans_get_flags (alpm_handle_t *handle)
 Returns the bitfield of flags for the current transaction.
alpm_list_talpm_trans_get_add (alpm_handle_t *handle)
 Returns a list of packages added by the transaction.
alpm_list_talpm_trans_get_remove (alpm_handle_t *handle)
 Returns the list of packages removed by the transaction.
int alpm_trans_init (alpm_handle_t *handle, alpm_transflag_t flags)
 Initialize the transaction.
int alpm_trans_prepare (alpm_handle_t *handle, alpm_list_t **data)
 Prepare a transaction.
int alpm_trans_commit (alpm_handle_t *handle, alpm_list_t **data)
 Commit a transaction.
int alpm_trans_interrupt (alpm_handle_t *handle)
 Interrupt a transaction.
int alpm_trans_release (alpm_handle_t *handle)
 Release a transaction.
alpm_list_talpm_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_talpm_find_satisfier (alpm_list_t *pkgs, const char *depstring)
 Find a package satisfying a specified dependency.
alpm_pkg_talpm_find_dbs_satisfier (alpm_handle_t *handle, alpm_list_t *dbs, const char *depstring)
 Find a package satisfying a specified dependency.
alpm_list_talpm_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.
char * alpm_compute_md5sum (const char *name)
char * alpm_compute_sha256sum (const char *filename)
alpm_errno_t alpm_errno (alpm_handle_t *handle)
 Returns the current error code from the handle.
const char * alpm_strerror (alpm_errno_t err)
 Returns the string corresponding to an error number.
alpm_handle_talpm_initialize (const char *root, const char *dbpath, alpm_errno_t *err)
 Initializes the library.
int alpm_release (alpm_handle_t *handle)
 Release the library.
const char * alpm_version (void)
 Get the version of library.
enum alpm_caps alpm_capabilities (void)
 Get the capabilities of the library.
Accessors to the list of package cache directories.
alpm_list_talpm_option_get_cachedirs (alpm_handle_t *handle)
int alpm_option_set_cachedirs (alpm_handle_t *handle, alpm_list_t *cachedirs)
int alpm_option_add_cachedir (alpm_handle_t *handle, const char *cachedir)
int alpm_option_remove_cachedir (alpm_handle_t *handle, const char *cachedir)
Accessors to the list of no-upgrade files.

These functions modify the list of files which should not be updated by package installation.

alpm_list_talpm_option_get_noupgrades (alpm_handle_t *handle)
int alpm_option_add_noupgrade (alpm_handle_t *handle, const char *pkg)
int alpm_option_set_noupgrades (alpm_handle_t *handle, alpm_list_t *noupgrade)
int alpm_option_remove_noupgrade (alpm_handle_t *handle, const char *pkg)
Accessors to the list of no-extract files.

These functions modify the list of filenames which should be skipped packages which should not be upgraded by a sysupgrade operation.

alpm_list_talpm_option_get_noextracts (alpm_handle_t *handle)
int alpm_option_add_noextract (alpm_handle_t *handle, const char *pkg)
int alpm_option_set_noextracts (alpm_handle_t *handle, alpm_list_t *noextract)
int alpm_option_remove_noextract (alpm_handle_t *handle, const char *pkg)
Accessors to the list of ignored packages.

These functions modify the list of packages that should be ignored by a sysupgrade.

alpm_list_talpm_option_get_ignorepkgs (alpm_handle_t *handle)
int alpm_option_add_ignorepkg (alpm_handle_t *handle, const char *pkg)
int alpm_option_set_ignorepkgs (alpm_handle_t *handle, alpm_list_t *ignorepkgs)
int alpm_option_remove_ignorepkg (alpm_handle_t *handle, const char *pkg)
Accessors to the list of ignored groups.

These functions modify the list of groups whose packages should be ignored by a sysupgrade.

alpm_list_talpm_option_get_ignoregroups (alpm_handle_t *handle)
int alpm_option_add_ignoregroup (alpm_handle_t *handle, const char *grp)
int alpm_option_set_ignoregroups (alpm_handle_t *handle, alpm_list_t *ignoregrps)
int alpm_option_remove_ignoregroup (alpm_handle_t *handle, const char *grp)
Accessors to the list of servers for a database.
alpm_list_talpm_db_get_servers (const alpm_db_t *db)
 Get the serverlist of a database.
int alpm_db_set_servers (alpm_db_t *db, alpm_list_t *servers)
 Set the serverlist of a database.
int alpm_db_add_server (alpm_db_t *db, const char *url)
 Add a download server to a database.
int alpm_db_remove_server (alpm_db_t *db, const char *url)
 Remove a download server from a database.
Package Property Accessors

Any pointer returned by these functions points to internal structures allocated by libalpm.

They should not be freed nor modified in any way.

const char * alpm_pkg_get_filename (alpm_pkg_t *pkg)
 Gets the name of the file from which the package was loaded.
const char * alpm_pkg_get_name (alpm_pkg_t *pkg)
 Returns the package name.
const char * alpm_pkg_get_version (alpm_pkg_t *pkg)
 Returns the package version as a string.
alpm_pkgfrom_t alpm_pkg_get_origin (alpm_pkg_t *pkg)
 Returns the origin of the package.
const char * alpm_pkg_get_desc (alpm_pkg_t *pkg)
 Returns the package description.
const char * alpm_pkg_get_url (alpm_pkg_t *pkg)
 Returns the package URL.
alpm_time_t alpm_pkg_get_builddate (alpm_pkg_t *pkg)
 Returns the build timestamp of the package.
alpm_time_t alpm_pkg_get_installdate (alpm_pkg_t *pkg)
 Returns the install timestamp of the package.
const char * alpm_pkg_get_packager (alpm_pkg_t *pkg)
 Returns the packager's name.
const char * alpm_pkg_get_md5sum (alpm_pkg_t *pkg)
 Returns the package's MD5 checksum as a string.
const char * alpm_pkg_get_sha256sum (alpm_pkg_t *pkg)
 Returns the package's SHA256 checksum as a string.
const char * alpm_pkg_get_arch (alpm_pkg_t *pkg)
 Returns the architecture for which the package was built.
off_t alpm_pkg_get_size (alpm_pkg_t *pkg)
 Returns the size of the package.
off_t alpm_pkg_get_isize (alpm_pkg_t *pkg)
 Returns the installed size of the package.
alpm_pkgreason_t alpm_pkg_get_reason (alpm_pkg_t *pkg)
 Returns the package installation reason.
alpm_list_talpm_pkg_get_licenses (alpm_pkg_t *pkg)
 Returns the list of package licenses.
alpm_list_talpm_pkg_get_groups (alpm_pkg_t *pkg)
 Returns the list of package groups.
alpm_list_talpm_pkg_get_depends (alpm_pkg_t *pkg)
 Returns the list of package dependencies as alpm_depend_t.
alpm_list_talpm_pkg_get_optdepends (alpm_pkg_t *pkg)
 Returns the list of package optional dependencies.
alpm_list_talpm_pkg_get_conflicts (alpm_pkg_t *pkg)
 Returns the list of packages conflicting with pkg.
alpm_list_talpm_pkg_get_provides (alpm_pkg_t *pkg)
 Returns the list of packages provided by pkg.
alpm_list_talpm_pkg_get_deltas (alpm_pkg_t *pkg)
 Returns the list of available deltas for pkg.
alpm_list_talpm_pkg_get_replaces (alpm_pkg_t *pkg)
 Returns the list of packages to be replaced by pkg.
alpm_filelist_talpm_pkg_get_files (alpm_pkg_t *pkg)
 Returns the list of files installed by pkg.
alpm_list_talpm_pkg_get_backup (alpm_pkg_t *pkg)
 Returns the list of files backed up when installing pkg.
alpm_db_talpm_pkg_get_db (alpm_pkg_t *pkg)
 Returns the database containing pkg.
const char * alpm_pkg_get_base64_sig (alpm_pkg_t *pkg)
 Retuns the base64 encoded package signature.
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.

Define Documentation

#define DEPRECATED   __attribute__((deprecated))

Definition at line 36 of file alpm.h.


Enumeration Type Documentation

enum alpm_caps
Enumerator:
ALPM_CAPABILITY_NLS 
ALPM_CAPABILITY_DOWNLOADER 
ALPM_CAPABILITY_SIGNATURES 

Definition at line 1200 of file alpm.h.


Function Documentation

enum alpm_caps alpm_capabilities ( void  )

Get the capabilities of the library.

Returns:
a bitmask of the capabilities

Definition at line 140 of file alpm.c.

References ALPM_CAPABILITY_DOWNLOADER, ALPM_CAPABILITY_NLS, and ALPM_CAPABILITY_SIGNATURES.

Referenced by config_new().

Here is the caller graph for this function:

char* alpm_compute_md5sum ( const char *  name)

Definition at line 911 of file lib/libalpm/util.c.

References ASSERT, and md5_file().

Referenced by _alpm_test_checksum().

Here is the call graph for this function:

Here is the caller graph for this function:

char* alpm_compute_sha256sum ( const char *  filename)

Definition at line 930 of file lib/libalpm/util.c.

References ASSERT, and sha2_file().

Referenced by _alpm_test_checksum().

Here is the call graph for this function:

Here is the caller graph for this function:

const char* alpm_version ( void  )

Get the version of library.

Returns:
the library version, e.g. "6.0.4"

Definition at line 132 of file alpm.c.