Crate alpm_sys[][src]

Modules

_alpm_db_usage_t
_alpm_loglevel_t
_alpm_pkgvalidation_t
_alpm_question_type_t
_alpm_siglevel_t
_alpm_transflag_t
alpm_caps

Structs

__alpm_list_t
__va_list_tag
_alpm_backup_t

Local package or package file backup entry

_alpm_conflict_t

A conflict that has occurred between two packages.

_alpm_depend_t

The basic dependency type.

_alpm_depmissing_t

Missing dependency.

_alpm_download_event_completed_t

Context struct for when a download completes.

_alpm_download_event_init_t

Context struct for when a download starts.

_alpm_download_event_progress_t

Context struct for when a download progresses.

_alpm_download_event_retry_t

Context struct for when a download retries.

_alpm_event_any_t

An event that may represent any event.

_alpm_event_database_missing_t

A database is missing.

_alpm_event_hook_run_t

A pre/post transaction hook was ran.

_alpm_event_hook_t

pre/post transaction hooks are to be ran.

_alpm_event_optdep_removal_t

An optional dependency was removed.

_alpm_event_package_operation_t

A package operation event occurred.

_alpm_event_pacnew_created_t

A pacnew file was created.

_alpm_event_pacsave_created_t

A pacsave file was created.

_alpm_event_pkg_retrieve_t

Packages downloading about to start.

_alpm_event_pkgdownload_t

A package was downloaded.

_alpm_event_scriptlet_info_t

A scriptlet was ran.

_alpm_file_t

File in a package

_alpm_fileconflict_t

File conflict.

_alpm_filelist_t

Package filelist container

_alpm_group_t

Package group

_alpm_pgpkey_t

A PGP key

_alpm_question_any_t

A question that can represent any other question.

_alpm_question_conflict_t

Should a conflicting package be removed?

_alpm_question_corrupted_t

Should a corrupted package be deleted?

_alpm_question_import_key_t

Should a key be imported?

_alpm_question_install_ignorepkg_t

Should target in ignorepkg be installed anyway?

_alpm_question_remove_pkgs_t

Should unresolvable targets be removed from the transaction?

_alpm_question_replace_t

Should a package be replaced?

_alpm_question_select_provider_t

Provider selection

_alpm_siglist_t

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

_alpm_sigresult_t

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

archive
archive_entry

Enums

_alpm_depmod_t

Types of version constraints in dependency specs.

_alpm_download_event_type_t

File download events. These events are reported by ALPM via download callback.

_alpm_errno_t

libalpm’s error type

_alpm_event_type_t

Type of events.

_alpm_fileconflicttype_t

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

_alpm_hook_when_t

Kind of hook.

_alpm_package_operation_t

An enum over the kind of package operations.

_alpm_pkgfrom_t

Location a package object was loaded from.

_alpm_pkgreason_t

Package install reasons.

_alpm_progress_t

An enum over different kinds of progress alerts.

_alpm_sigstatus_t

PGP signature verification status return codes

_alpm_sigvalidity_t

The trust level of a PGP key

alpm_depmod_t

Types of version constraints in dependency specs.

alpm_download_event_type_t

File download events. These events are reported by ALPM via download callback.

alpm_errno_t

libalpm’s error type

alpm_event_type_t

Type of events.

alpm_fileconflicttype_t

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

alpm_hook_when_t

Kind of hook.

alpm_package_operation_t

An enum over the kind of package operations.

alpm_pkgfrom_t

Location a package object was loaded from.

alpm_pkgreason_t

Package install reasons.

alpm_progress_t

An enum over different kinds of progress alerts.

alpm_sigstatus_t

PGP signature verification status return codes

alpm_sigvalidity_t

The trust level of a PGP key

Functions

alpm_add_pkg

Add a package to the transaction. If the package was loaded by alpm_pkg_load(), it will be freed upon \link alpm_trans_release \endlink invocation. @param handle the context handle @param pkg the package to add @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_capabilities

Get the capabilities of the library. @return a bitmask of the capabilities

alpm_checkconflicts

Check the package conflicts in a database

alpm_checkdeps

Checks dependencies and returns missing ones in a list. Dependencies can include versions with depmod operators. @param handle the context handle @param pkglist the list of local packages @param remove an alpm_list_t* of packages to be removed @param upgrade an alpm_list_t* of packages to be upgraded (remove-then-upgrade) @param reversedeps handles the backward dependencies @return an alpm_list_t* of alpm_depmissing_t pointers.

alpm_compute_md5sum

Get the md5 sum of file. @param filename name of the file @return the checksum on success, NULL on error

alpm_compute_sha256sum

Get the sha256 sum of file. @param filename name of the file @return the checksum on success, NULL on error

alpm_conflict_free

Free a conflict and its members. @param conflict the conflict to free

alpm_db_add_server

Add a download server to a database. @param db database pointer @param url url of the server @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_db_check_pgp_signature

Check the PGP signature for the given database. @param db the database to check @param siglist a pointer to storage for signature results @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred)

alpm_db_get_group

Get a group entry from a package database. Looking up a group is O(1) and will be significantly faster than iterating over the groupcahe. @param db pointer to the package database to get the group from @param name of the group @return the groups entry on success, NULL on error

alpm_db_get_groupcache

Get the group cache of a package database. @param db pointer to the package database to get the group from @return the list of groups on success, NULL on error

alpm_db_get_name

Get the name of a package database. @param db pointer to the package database @return the name of the package database, NULL on error

alpm_db_get_pkg

Get a package entry from a package database. Looking up a package is O(1) and will be significantly faster than iterating over the pkgcahe. @param db pointer to the package database to get the package from @param name of the package @return the package entry on success, NULL on error

alpm_db_get_pkgcache

Get the package cache of a package database. This is a list of all packages the db contains. @param db pointer to the package database to get the package from @return the list of packages on success, NULL on error

alpm_db_get_servers

Get the list of servers assigned to this db. @param db pointer to the database to get the servers from @return a char* list of servers

alpm_db_get_siglevel

Get the signature verification level for a database. Will return the default verification level if this database is set up with ALPM_SIG_USE_DEFAULT. @param db pointer to the package database @return the signature verification level

alpm_db_get_usage

Gets the usage of a database. @param db pointer to the package database to get the status of @param usage pointer to an alpm_db_usage_t to store db’s status @return 0 on success, or -1 on error

alpm_db_get_valid

Check the validity of a database. This is most useful for sync databases and verifying signature status. If invalid, the handle error code will be set accordingly. @param db pointer to the package database @return 0 if valid, -1 if invalid (pm_errno is set accordingly)

alpm_db_remove_server

Remove a download server from a database. @param db database pointer @param url url of the server @return 0 on success, 1 on server not present, -1 on error (pm_errno is set accordingly)

alpm_db_search

Searches a database with regular expressions. @param db pointer to the package database to search in @param needles a list of regular expressions to search for @param ret pointer to list for storing packages matching all regular expressions - must point to an empty (NULL) alpm_list_t *. @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_db_set_servers

Sets the list of servers for the database to use. @param db the database to set the servers. The list will be duped and the original will still need to be freed by the caller. @param servers a char* list of servers.

alpm_db_set_usage

Sets the usage of a database. @param db pointer to the package database to set the status for @param usage a bitmask of alpm_db_usage_t values @return 0 on success, or -1 on error

alpm_db_unregister

Unregister a package database. Databases can not be unregistered when there is an active transaction.

alpm_db_update

Update package databases.

alpm_decode_signature

Decode a loaded signature in base64 form. @param base64_data the signature to attempt to decode @param data the decoded data; must be freed by the caller @param data_len the length of the returned data @return 0 on success, -1 on failure to properly decode

alpm_dep_compute_string

Returns a newly allocated string representing the dependency information. @param dep a dependency info structure @return a formatted string, e.g. “glibc>=2.12”

alpm_dep_free

Free a dependency info structure @param dep struct to free

alpm_dep_from_string

Return a newly allocated dependency information parsed from a string \link alpm_dep_free should be used to free the dependency \endlink @param depstring a formatted string, e.g. “glibc=2.12” @return a dependency info structure

alpm_depmissing_free

Free a depmissing and its members @param miss the depmissing to free

alpm_errno

Returns the current error code from the handle. @param handle the context handle @return the current error code of the handle

alpm_extract_keyid

Extract the Issuer Key ID from a signature @param handle the context handle @param identifier the identifier of the key. This may be the name of the package or the path to the package. @param sig PGP signature @param len length of signature @param keys a pointer to storage for key IDs @return 0 on success, -1 on error

alpm_fetch_pkgurl

Fetch a list of remote packages. @param handle the context handle @param urls list of package URLs to download @param fetched list of filepaths to the fetched packages, each item corresponds to one in urls list. This is an output parameter, the caller should provide a pointer to an empty list (*fetched === NULL) and the callee fills the list with data. @return 0 on success or -1 on failure

alpm_fileconflict_free

Free a fileconflict and its members. @param conflict the fileconflict to free

alpm_filelist_contains

Determines whether a package filelist contains a given path. The provided path should be relative to the install root with no leading slashes, e.g. “etc/localtime”. When searching for directories, the path must have a trailing slash. @param filelist a pointer to a package filelist @param path the path to search for in the package @return a pointer to the matching file or NULL if not found

alpm_find_dbs_satisfier

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 satisfyer that belongs to an installed package is returned. If no providers belong to an installed package then an alpm_question_select_provider_t is created to select the provider. The dependency can include versions with depmod operators.

alpm_find_group_pkgs

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. @param dbs the list of alpm_db_t * @param name the name of the group @return the list of alpm_pkg_t * (caller is responsible for alpm_list_free)

alpm_find_satisfier

Find a package satisfying a specified dependency. The dependency can include versions with depmod operators. @param pkgs an alpm_list_t* of alpm_pkg_t where the satisfyer will be searched @param depstring package or provision name, versioned or not @return a alpm_pkg_t* satisfying depstring

alpm_get_localdb

Get the database of locally installed packages. The returned pointer points to an internal structure of libalpm which should only be manipulated through libalpm functions. @return a reference to the local database

alpm_get_syncdbs

Get the list of sync databases. Returns a list of alpm_db_t structures, one for each registered sync database.

alpm_initialize

Initializes the library. Creates handle, connects to database and creates lockfile. This must be called before any other functions are called. @param root the root path for all filesystem operations @param dbpath the absolute path to the libalpm database @param err an optional variable to hold any error return codes @return a context handle on success, NULL on error, err will be set if provided

alpm_list_add
alpm_list_add_sorted
alpm_list_append
alpm_list_append_strdup
alpm_list_copy
alpm_list_copy_data
alpm_list_count
alpm_list_diff
alpm_list_diff_sorted
alpm_list_find
alpm_list_find_ptr
alpm_list_find_str
alpm_list_free
alpm_list_free_inner
alpm_list_join
alpm_list_last
alpm_list_mmerge
alpm_list_msort
alpm_list_next
alpm_list_nth
alpm_list_previous
alpm_list_remove
alpm_list_remove_dupes
alpm_list_remove_item
alpm_list_remove_str
alpm_list_reverse
alpm_list_strdup
alpm_list_to_array
alpm_logaction

A printf-like function for logging. @param handle the context handle @param prefix caller-specific prefix for the log @param fmt output format @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_add_architecture

Adds an allowed package architecture. @param handle the context handle @param arch the architecture to set

alpm_option_add_assumeinstalled

Add a depend to the assumed installed list @param handle the context handle @param dep the dependency to add @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_add_cachedir

Append a cachedir to the configured cachedirs. @param handle the context handle @param cachedir the cachedir to add @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_add_hookdir

Append a hookdir to the configured hookdirs. @param handle the context handle @param hookdir the hookdir to add @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_add_ignoregroup

Add a file to the ignored group list @param handle the context handle @param grp the group to add @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_add_ignorepkg

Add a file to the ignored package list @param handle the context handle @param pkg the package to add @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_add_noextract

Add a file to the no-extract list @param handle the context handle @param path the path to add @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_add_noupgrade

Add a file to the no-upgrade list @param handle the context handle @param path the path to add @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_add_overwrite_file

Append an overwritable file to the configured overwritable files. @param handle the context handle @param glob the file glob to add @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_get_architectures

Returns the allowed package architecture. @param handle the context handle @return the configured package architectures

alpm_option_get_assumeinstalled

Gets the list of dependencies that are assumed to be met @param handle the context handle @return a list of alpm_depend_t*

alpm_option_get_cachedirs

Gets the currently configured cachedirs, @param handle the context handle @return a char* list of cache directories

alpm_option_get_checkspace

Get whether or not checking for free space before installing packages is enabled. @param handle the context handle @return 0 if disabled, 1 if enabled

alpm_option_get_dbext

Gets the configured database extension. @param handle the context handle @return the configured database extension

alpm_option_get_dbpath

Returns the path to the database directory. Read-only. @param handle the context handle

alpm_option_get_default_siglevel

Get the default siglevel. @param handle the context handle @return a \link alpm_siglevel_t \endlink bitfield of the siglevel

alpm_option_get_dlcb

Returns the callback used to report download progress. @param handle the context handle @return the currently set download callback

alpm_option_get_dlcb_ctx

Returns the callback used to report download progress. @param handle the context handle @return the currently set download callback context

alpm_option_get_eventcb

Returns the callback used for events. @param handle the context handle @return the currently set event callback

alpm_option_get_eventcb_ctx

Returns the callback used for events. @param handle the context handle @return the currently set event callback context

alpm_option_get_fetchcb

Returns the downloading callback. @param handle the context handle @return the currently set fetch callback

alpm_option_get_fetchcb_ctx

Returns the downloading callback. @param handle the context handle @return the currently set fetch callback context

alpm_option_get_gpgdir

Returns the path to libalpm’s GnuPG home directory. @param handle the context handle @return the path to libalpms’s GnuPG home directory

alpm_option_get_hookdirs

Gets the currently configured hookdirs, @param handle the context handle @return a char* list of hook directories

alpm_option_get_ignoregroups

Get the list of ignored groups @param handle the context handle @return the char* list of ignored groups

alpm_option_get_ignorepkgs

Get the list of ignored packages @param handle the context handle @return the char* list of ignored packages

alpm_option_get_local_file_siglevel

Get the configured local file siglevel. @param handle the context handle @return a \link alpm_siglevel_t \endlink bitfield of the siglevel

alpm_option_get_lockfile

Get the name of the database lock file. Read-only. This is the name that the lockfile would have. It does not matter if the lockfile actually exists on disk. @param handle the context handle

alpm_option_get_logcb

Returns the callback used for logging. @param handle the context handle @return the currently set log callback

alpm_option_get_logcb_ctx

Returns the callback used for logging. @param handle the context handle @return the currently set log callback context

alpm_option_get_logfile

Gets the filepath to the currently set logfile. @param handle the context handle @return the path to the logfile

alpm_option_get_noextracts

Get the list of no-extract files @param handle the context handle @return the char* list of no-extract files

alpm_option_get_noupgrades

Get the list of no-upgrade files @param handle the context handle @return the char* list of no-upgrade files

alpm_option_get_overwrite_files

Gets the currently configured overwritable files, @param handle the context handle @return a char* list of overwritable file globs

alpm_option_get_parallel_downloads

Gets the number of parallel streams to download database and package files. @param handle the context handle @return the number of parallel streams to download database and package files

alpm_option_get_progresscb

Returns the callback used for operation progress. @param handle the context handle @return the currently set progress callback

alpm_option_get_progresscb_ctx

Returns the callback used for operation progress. @param handle the context handle @return the currently set progress callback context

alpm_option_get_questioncb

Returns the callback used for questions. @param handle the context handle @return the currently set question callback

alpm_option_get_questioncb_ctx

Returns the callback used for questions. @param handle the context handle @return the currently set question callback context

alpm_option_get_remote_file_siglevel

Get the configured remote file siglevel. @param handle the context handle @return a \link alpm_siglevel_t \endlink bitfield of the siglevel

alpm_option_get_root

Returns the root path. Read-only. @param handle the context handle

alpm_option_get_usesyslog

Returns whether to use syslog (0 is FALSE, TRUE otherwise). @param handle the context handle @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_match_noextract

Test if a path matches any of the globs in the no-extract list @param handle the context handle @param path the path to test @return 0 is the path matches a glob, negative if there is no match and positive is the match was inverted

alpm_option_match_noupgrade

Test if a path matches any of the globs in the no-upgrade list @param handle the context handle @param path the path to test @return 0 is the path matches a glob, negative if there is no match and positive is the match was inverted

alpm_option_remove_architecture

Removes an allowed package architecture. @param handle the context handle @param arch the architecture to remove

alpm_option_remove_assumeinstalled

Remove an entry from the assume installed list @param handle the context handle @param dep the dep to remove @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_remove_cachedir

Remove a cachedir from the configured cachedirs. @param handle the context handle @param cachedir the cachedir to remove @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_remove_hookdir

Remove a hookdir from the configured hookdirs. @param handle the context handle @param hookdir the hookdir to remove @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_remove_ignoregroup

Remove an entry from the ignoregroup list @param handle the context handle @param grp the group to remove @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_remove_ignorepkg

Remove an entry from the ignorepkg list @param handle the context handle @param pkg the package to remove @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_remove_noextract

Remove an entry from the no-extract list @param handle the context handle @param path the path to remove @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_remove_noupgrade

Remove an entry from the no-upgrade list @param handle the context handle @param path the path to remove @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_remove_overwrite_file

Remove a file glob from the configured overwritable files globs. @note The overwritable file list contains a list of globs. The glob to remove must exactly match the entry to remove. There is no glob expansion. @param handle the context handle @param glob the file glob to remove @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_architectures

Sets the allowed package architecture. @param handle the context handle @param arches the architecture to set

alpm_option_set_assumeinstalled

Sets the list of dependencies that are assumed to be met @param handle the context handle @param deps a list of *alpm_depend_t The list will be duped and the original will still need to be freed by the caller. @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_cachedirs

Sets the cachedirs. @param handle the context handle @param cachedirs a char* list of cachdirs. The list will be duped and the original will still need to be freed by the caller. @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_checkspace

Enable/disable checking free space before installing packages. @param handle the context handle @param checkspace 0 for disabled, 1 for enabled

alpm_option_set_dbext

Sets the database extension. @param handle the context handle @param dbext the database extension to use @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_default_siglevel

Set the default siglevel. @param handle the context handle @param level a \link alpm_siglevel_t \endlink bitfield of the level to set @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_disable_dl_timeout

Enables/disables the download timeout. @param handle the context handle @param disable_dl_timeout 0 for enabled, 1 for disabled @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_dlcb

Sets the callback used to report download progress. @param handle the context handle @param cb the cb to use @param ctx user-provided context to pass to cb @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_eventcb

Sets the callback used for events. @param handle the context handle @param cb the cb to use @param ctx user-provided context to pass to cb @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_fetchcb

Sets the downloading callback. @param handle the context handle @param cb the cb to use @param ctx user-provided context to pass to cb @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_gpgdir

Sets the path to libalpm’s GnuPG home directory. @param handle the context handle @param gpgdir the gpgdir to set

alpm_option_set_hookdirs

Sets the hookdirs. @param handle the context handle @param hookdirs a char* list of hookdirs. The list will be duped and the original will still need to be freed by the caller. @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_ignoregroups

Sets the list of groups to ignore @param handle the context handle @param ignoregrps a char* list of groups to ignore The list will be duped and the original will still need to be freed by the caller. @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_ignorepkgs

Sets the list of packages to ignore @param handle the context handle @param ignorepkgs a char* list of packages to ignore The list will be duped and the original will still need to be freed by the caller. @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_local_file_siglevel

Set the local file siglevel. @param handle the context handle @param level a \link alpm_siglevel_t \endlink bitfield of the level to set @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_logcb

Sets the callback used for logging. @param handle the context handle @param cb the cb to use @param ctx user-provided context to pass to cb @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_logfile

Sets the logfile path. @param handle the context handle @param logfile path to the new location of the logfile @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_noextracts

Sets the list of no-extract files @param handle the context handle @param noextract a char* list of file to not extract. The list will be duped and the original will still need to be freed by the caller. @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_noupgrades

Sets the list of no-upgrade files @param handle the context handle @param noupgrade a char* list of file to not upgrade. The list will be duped and the original will still need to be freed by the caller. @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_overwrite_files

Sets the overwritable files. @param handle the context handle @param globs a char* list of overwritable file globs. The list will be duped and the original will still need to be freed by the caller. @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_parallel_downloads

Sets number of parallel streams to download database and package files. @param handle the context handle @param num_streams number of parallel download streams @return 0 on success, -1 on error

alpm_option_set_progresscb

Sets the callback used for operation progress. @param handle the context handle @param cb the cb to use @param ctx user-provided context to pass to cb @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_questioncb

Sets the callback used for questions. @param handle the context handle @param cb the cb to use @param ctx user-provided context to pass to cb @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_remote_file_siglevel

Set the remote file siglevel. @param handle the context handle @param level a \link alpm_siglevel_t \endlink bitfield of the level to set @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_option_set_usesyslog

Sets whether to use syslog (0 is FALSE, TRUE otherwise). @param handle the context handle @param usesyslog whether to use the syslog (0 is FALSE, TRUE otherwise)

alpm_pkg_changelog_close

Close a package changelog for reading. @param pkg the package to close the changelog of (either file or db) @param fp the ‘file stream’ to the package changelog to close @return 0 on success, -1 on error

alpm_pkg_changelog_open

Open a package changelog for reading. Similar to fopen in functionality, except that the returned ‘file stream’ could really be from an archive as well as from the database. @param pkg the package to read the changelog of (either file or db) @return a ‘file stream’ to the package changelog

alpm_pkg_changelog_read

Read data from an open changelog ‘file stream’. Similar to fread in functionality, this function takes a buffer and amount of data to read. If an error occurs pm_errno will be set. @param ptr a buffer to fill with raw changelog data @param size the size of the buffer @param pkg the package that the changelog is being read from @param fp a ‘file stream’ to the package changelog @return the number of characters read, or 0 if there is no more data or an error occurred.

alpm_pkg_check_pgp_signature

Check the PGP signature for the given package file. @param pkg the package to check @param siglist a pointer to storage for signature results @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred)

alpm_pkg_checkmd5sum

Check the integrity (with md5) of a package from the sync cache. @param pkg package pointer @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_pkg_compute_optionalfor

Computes the list of packages optionally requiring a given package. The return value of this function is a newly allocated list of package names (char*), it should be freed by the caller. @param pkg a package @return the list of packages optionally requiring pkg

alpm_pkg_compute_requiredby

Computes the list of packages requiring a given package. The return value of this function is a newly allocated list of package names (char*), it should be freed by the caller. @param pkg a package @return the list of packages requiring pkg

alpm_pkg_download_size

Returns the size of the files that will be downloaded to install a package. @param newpkg the new package to upgrade to @return the size of the download

alpm_pkg_find

Find a package in a list by name. @param haystack a list of alpm_pkg_t @param needle the package name @return a pointer to the package if found or NULL

alpm_pkg_free

Free a package. Only packages loaded with \link alpm_pkg_load \endlink can be freed. Packages from databases will be freed by libalpm when they are unregistered. @param pkg package pointer to free @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_pkg_get_arch

Returns the architecture for which the package was built. @param pkg a pointer to package @return a reference to an internal string

alpm_pkg_get_backup

Returns the list of files backed up when installing pkg. @param pkg a pointer to package @return a reference to a list of alpm_backup_t objects

alpm_pkg_get_base

Returns the package base name. @param pkg a pointer to package @return a reference to an internal string

alpm_pkg_get_base64_sig

Returns the base64 encoded package signature. @param pkg a pointer to package @return a reference to an internal string

alpm_pkg_get_builddate

Returns the build timestamp of the package. @param pkg a pointer to package @return the timestamp of the build time

alpm_pkg_get_checkdepends

Returns a list of package check dependencies @param pkg a pointer to package @return a reference to an internal list of alpm_depend_t structures.

alpm_pkg_get_conflicts

Returns the list of packages conflicting with pkg. @param pkg a pointer to package @return a reference to an internal list of alpm_depend_t structures.

alpm_pkg_get_db

Returns the database containing pkg. Returns a pointer to the alpm_db_t structure the package is originating from, or NULL if the package was loaded from a file. @param pkg a pointer to package @return a pointer to the DB containing pkg, or NULL.

alpm_pkg_get_depends

Returns the list of package dependencies as alpm_depend_t. @param pkg a pointer to package @return a reference to an internal list of alpm_depend_t structures.

alpm_pkg_get_desc

Returns the package description. @param pkg a pointer to package @return a reference to an internal string

alpm_pkg_get_filename

Gets the name of the file from which the package was loaded. @param pkg a pointer to package @return a reference to an internal string

alpm_pkg_get_files

Returns the list of files installed by pkg. The filenames are relative to the install root, and do not include leading slashes. @param pkg a pointer to package @return a pointer to a filelist object containing a count and an array of package file objects

alpm_pkg_get_groups

Returns the list of package groups. @param pkg a pointer to package @return a pointer to an internal list of strings.

alpm_pkg_get_installdate

Returns the install timestamp of the package. @param pkg a pointer to package @return the timestamp of the install time

alpm_pkg_get_isize

Returns the installed size of the package. @param pkg a pointer to package @return the total size of files installed by the package.

alpm_pkg_get_licenses

Returns the list of package licenses. @param pkg a pointer to package @return a pointer to an internal list of strings.

alpm_pkg_get_makedepends

Returns a list of package make dependencies @param pkg a pointer to package @return a reference to an internal list of alpm_depend_t structures.

alpm_pkg_get_md5sum

Returns the package’s MD5 checksum as a string. The returned string is a sequence of 32 lowercase hexadecimal digits. @param pkg a pointer to package @return a reference to an internal string

alpm_pkg_get_name

Returns the package name. @param pkg a pointer to package @return a reference to an internal string

alpm_pkg_get_optdepends

Returns the list of package optional dependencies. @param pkg a pointer to package @return a reference to an internal list of alpm_depend_t structures.

alpm_pkg_get_origin

Returns the origin of the package. @return an alpm_pkgfrom_t constant, -1 on error

alpm_pkg_get_packager

Returns the packager’s name. @param pkg a pointer to package @return a reference to an internal string

alpm_pkg_get_provides

Returns the list of packages provided by pkg. @param pkg a pointer to package @return a reference to an internal list of alpm_depend_t structures.

alpm_pkg_get_reason

Returns the package installation reason. @param pkg a pointer to package @return an enum member giving the install reason.

alpm_pkg_get_replaces

Returns the list of packages to be replaced by pkg. @param pkg a pointer to package @return a reference to an internal list of alpm_depend_t structures.

alpm_pkg_get_sha256sum

Returns the package’s SHA256 checksum as a string. The returned string is a sequence of 64 lowercase hexadecimal digits. @param pkg a pointer to package @return a reference to an internal string

alpm_pkg_get_sig

Extracts package signature either from embedded package signature or if it is absent then reads data from detached signature file. @param pkg a pointer to package. @param sig output parameter for signature data. Callee function allocates a buffer needed for the signature data. Caller is responsible for freeing this buffer. @param sig_len output parameter for the signature data length. @return 0 on success, negative number on error.

alpm_pkg_get_size

Returns the size of the package. This is only available for sync database packages and package files, not those loaded from the local database. @param pkg a pointer to package @return the size of the package in bytes.

alpm_pkg_get_url

Returns the package URL. @param pkg a pointer to package @return a reference to an internal string

alpm_pkg_get_validation

Returns the method used to validate a package during install. @param pkg a pointer to package @return an enum member giving the validation method

alpm_pkg_get_version

Returns the package version as a string. This includes all available epoch, version, and pkgrel components. Use alpm_pkg_vercmp() to compare version strings if necessary. @param pkg a pointer to package @return a reference to an internal string

alpm_pkg_has_scriptlet

Returns whether the package has an install scriptlet. @return 0 if FALSE, TRUE otherwise

alpm_pkg_load

Create a package from a file. If full is false, the archive is read only until all necessary metadata is found. If it is true, the entire archive is read, which serves as a verification of integrity and the filelist can be created. The allocated structure should be freed using alpm_pkg_free(). @param handle the context handle @param filename location of the package tarball @param full whether to stop the load after metadata is read or continue through the full archive @param level what level of package signature checking to perform on the package; note that this must be a ‘.sig’ file type verification @param pkg address of the package pointer @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_pkg_mtree_close

Close a package mtree file. @param pkg the local package to close the mtree of @param archive the archive to close

alpm_pkg_mtree_next

Read next entry from a package mtree file. @param pkg the package that the mtree file is being read from @param archive the archive structure reading from the mtree file @param entry an archive_entry to store the entry header information @return 0 on success, 1 if end of archive is reached, -1 otherwise.

alpm_pkg_mtree_open

Open a package mtree file for reading. @param pkg the local package to read the mtree of @return an archive structure for the package mtree file

alpm_pkg_set_reason

Set install reason for a package in the local database. The provided package object must be from the local database or this method will fail. The write to the local database is performed immediately. @param pkg the package to update @param reason the new install reason @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_pkg_should_ignore

Test if a package should be ignored. Checks if the package is ignored via IgnorePkg, or if the package is in a group ignored via IgnoreGroup. @param handle the context handle @param pkg the package to test @return 1 if the package should be ignored, 0 otherwise

alpm_pkg_vercmp

Compare two version strings and determine which one is ‘newer’. Returns a value comparable to the way strcmp works. Returns 1 if a is newer than b, 0 if a and b are the same version, or -1 if b is newer than a.

alpm_register_syncdb

Register a sync database of packages. Databases can not be registered when there is an active transaction.

alpm_release

Release the library. Disconnects from the database, removes handle and lockfile This should be the last alpm call you make. After this returns, handle should be considered invalid and cannot be reused in any way. @param handle the context handle @return 0 on success, -1 on error

alpm_remove_pkg

Add a package removal to the transaction. @param handle the context handle @param pkg the package to uninstall @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_siglist_cleanup

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. @param siglist a pointer to storage for signature results @return 0 on success, -1 on error

alpm_strerror

Returns the string corresponding to an error number. @param err the error code to get the string for @return the string relating to the given error code

alpm_sync_get_new_version

Check for new version of pkg in syncdbs.

alpm_sync_sysupgrade

Search for packages to upgrade and add them to the transaction. @param handle the context handle @param enable_downgrade allow downgrading of packages if the remote version is lower @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_trans_commit

Commit a transaction. @param handle the context handle @param data the address of an alpm_list where detailed description of an error can be dumped (i.e. list of conflicting files) @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_trans_get_add

Returns a list of packages added by the transaction. @param handle the context handle @return a list of alpm_pkg_t structures

alpm_trans_get_flags

Returns the bitfield of flags for the current transaction. @param handle the context handle @return the bitfield of transaction flags

alpm_trans_get_remove

Returns the list of packages removed by the transaction. @param handle the context handle @return a list of alpm_pkg_t structures

alpm_trans_init

Initialize the transaction. @param handle the context handle @param flags flags of the transaction (like nodeps, etc; see alpm_transflag_t) @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_trans_interrupt

Interrupt a transaction. @param handle the context handle @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_trans_prepare

Prepare a transaction. @param handle the context handle @param data the address of an alpm_list where a list of alpm_depmissing_t objects is dumped (conflicting packages) @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_trans_release

Release a transaction. @param handle the context handle @return 0 on success, -1 on error (pm_errno is set accordingly)

alpm_unlock

Remove the database lock file @param handle the context handle @return 0 on success, -1 on error

alpm_unregister_all_syncdbs

Unregister all package databases. Databases can not be unregistered while there is an active transaction.

alpm_version

Get the version of library. @return the library version, e.g. “6.0.4”

Type Definitions

__builtin_va_list
__int64_t
__mode_t
__off_t
alpm_backup_t

Local package or package file backup entry

alpm_cb_download

Type of download progress callbacks. @param ctx user-provided context @param filename the name of the file being downloaded @param event the event type @param data the event data of type alpm_download_event_*_t

alpm_cb_event

Event callback.

alpm_cb_fetch

A callback for downloading files @param ctx user-provided context @param url the URL of the file to be downloaded @param localpath the directory to which the file should be downloaded @param force whether to force an update, even if the file is the same @return 0 on success, 1 if the file exists and is identical, -1 on error.

alpm_cb_log

The callback type for logging.

alpm_cb_progress

Progress callback

alpm_cb_question

Question callback.

alpm_conflict_t

A conflict that has occurred between two packages.

alpm_db_t

A database.

alpm_db_usage_t

The usage level of a database.

alpm_depend_t

The basic dependency type.

alpm_depmissing_t

Missing dependency.

alpm_download_event_completed_t

Context struct for when a download completes.

alpm_download_event_init_t

Context struct for when a download starts.

alpm_download_event_progress_t

Context struct for when a download progresses.

alpm_download_event_retry_t

Context struct for when a download retries.

alpm_event_any_t

An event that may represent any event.

alpm_event_database_missing_t

A database is missing.

alpm_event_hook_run_t

A pre/post transaction hook was ran.

alpm_event_hook_t

pre/post transaction hooks are to be ran.

alpm_event_optdep_removal_t

An optional dependency was removed.

alpm_event_package_operation_t

A package operation event occurred.

alpm_event_pacnew_created_t

A pacnew file was created.

alpm_event_pacsave_created_t

A pacsave file was created.

alpm_event_pkg_retrieve_t

Packages downloading about to start.

alpm_event_pkgdownload_t

A package was downloaded.

alpm_event_scriptlet_info_t

A scriptlet was ran.

alpm_event_t

Events. This is a union passed to the callback that allows the frontend to know which type of event was triggered (via type). It is then possible to typecast the pointer to the right structure, or use the union field, in order to access event-specific data.

alpm_file_t

File in a package

alpm_fileconflict_t

File conflict.

alpm_filelist_t

Package filelist container

alpm_group_t

Package group

alpm_handle_t

The libalpm context handle.

alpm_list_fn_cmp
alpm_list_fn_free
alpm_list_t
alpm_loglevel_t

Logging Levels

alpm_pgpkey_t

A PGP key

alpm_pkg_t

A package.

alpm_pkgvalidation_t

Method used to validate a package.

alpm_question_any_t

A question that can represent any other question.

alpm_question_conflict_t

Should a conflicting package be removed?

alpm_question_corrupted_t

Should a corrupted package be deleted?

alpm_question_import_key_t

Should a key be imported?

alpm_question_install_ignorepkg_t

Should target in ignorepkg be installed anyway?

alpm_question_remove_pkgs_t

Should unresolvable targets be removed from the transaction?

alpm_question_replace_t

Should a package be replaced?

alpm_question_select_provider_t

Provider selection

alpm_question_t

Questions. This is an union passed to the callback that allows the frontend to know which type of question was triggered (via type). It is then possible to typecast the pointer to the right structure, or use the union field, in order to access question-specific data.

alpm_question_type_t

Type of question. Unlike the events or progress enumerations, this enum has bitmask values so a frontend can use a bitmask map to supply preselected answers to the different types of questions.

alpm_siglevel_t

PGP signature verification options

alpm_siglist_t

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

alpm_sigresult_t

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

alpm_time_t

The time type used by libalpm. Represents a unix time stamp @ingroup libalpm_misc

alpm_trans_t

Transaction structure used internally by libalpm @ingroup libalpm_trans

alpm_transflag_t

Transaction flags

mode_t
off_t
va_list

Unions

_alpm_event_t

Events. This is a union passed to the callback that allows the frontend to know which type of event was triggered (via type). It is then possible to typecast the pointer to the right structure, or use the union field, in order to access event-specific data.

_alpm_question_t

Questions. This is an union passed to the callback that allows the frontend to know which type of question was triggered (via type). It is then possible to typecast the pointer to the right structure, or use the union field, in order to access question-specific data.