Crate alpm_sys

source ·

Modules§

Structs§

Enums§

Functions§

  • 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)
  • Get the capabilities of the library. @return a bitmask of the capabilities
  • Check the package conflicts in a database
  • 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.
  • Get the md5 sum of file. @param filename name of the file @return the checksum on success, NULL on error
  • Get the sha256 sum of file. @param filename name of the file @return the checksum on success, NULL on error
  • Free a conflict and its members. @param conflict the conflict to free
  • Add a download cache 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)
  • 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)
  • Check the PGP signature for the given database. @param db the database to check @param siglist a pointer to storage for signature results @return 0 if valid, -1 if an error occurred or signature is invalid
  • Get the list of cache servers assigned to this db. @param db pointer to the database to get the servers from @return a char* list of servers
  • 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
  • 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
  • Get the handle of a package database. @param db pointer to the package database @return the alpm handle that the package database belongs to
  • Get the name of a package database. @param db pointer to the package database @return the name of the package database, NULL on error
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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)
  • Remove a download cache 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)
  • 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)
  • 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)
  • Sets the list of cache 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.
  • 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.
  • 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
  • Unregister a package database. Databases can not be unregistered when there is an active transaction.
  • Update package databases.
  • 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
  • Returns a newly allocated string representing the dependency information. @param dep a dependency info structure @return a formatted string, e.g. “glibc>=2.12”
  • Free a dependency info structure @param dep struct to free
  • 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
  • Free a depmissing and its members @param miss the depmissing to free
  • Returns the current error code from the handle. @param handle the context handle @return the current error code of the handle
  • 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
  • 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
  • Free a fileconflict and its members. @param conflict the fileconflict to free
  • 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
  • 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.
  • 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)
  • 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
  • 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
  • Get the list of sync databases. Returns a list of alpm_db_t structures, one for each registered sync database.
  • 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
  • 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)
  • Adds an allowed package architecture. @param handle the context handle @param arch the architecture to set
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • Returns the allowed package architecture. @param handle the context handle @return the configured package architectures
  • Gets the list of dependencies that are assumed to be met @param handle the context handle @return a list of alpm_depend_t*
  • Gets the currently configured cachedirs, @param handle the context handle @return a char* list of cache directories
  • 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
  • Gets the configured database extension. @param handle the context handle @return the configured database extension
  • Returns the path to the database directory. Read-only. @param handle the context handle
  • Get the default siglevel. @param handle the context handle @return a \link alpm_siglevel_t \endlink bitfield of the siglevel
  • Returns the callback used to report download progress. @param handle the context handle @return the currently set download callback
  • Returns the callback used to report download progress. @param handle the context handle @return the currently set download callback context
  • Returns the callback used for events. @param handle the context handle @return the currently set event callback
  • Returns the callback used for events. @param handle the context handle @return the currently set event callback context
  • Returns the downloading callback. @param handle the context handle @return the currently set fetch callback
  • Returns the downloading callback. @param handle the context handle @return the currently set fetch callback context
  • Returns the path to libalpm’s GnuPG home directory. @param handle the context handle @return the path to libalpms’s GnuPG home directory
  • Gets the currently configured hookdirs, @param handle the context handle @return a char* list of hook directories
  • Get the list of ignored groups @param handle the context handle @return the char* list of ignored groups
  • Get the list of ignored packages @param handle the context handle @return the char* list of ignored packages
  • Get the configured local file siglevel. @param handle the context handle @return a \link alpm_siglevel_t \endlink bitfield of the siglevel
  • 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
  • Returns the callback used for logging. @param handle the context handle @return the currently set log callback
  • Returns the callback used for logging. @param handle the context handle @return the currently set log callback context
  • Gets the filepath to the currently set logfile. @param handle the context handle @return the path to the logfile
  • Get the list of no-extract files @param handle the context handle @return the char* list of no-extract files
  • Get the list of no-upgrade files @param handle the context handle @return the char* list of no-upgrade files
  • Gets the currently configured overwritable files, @param handle the context handle @return a char* list of overwritable file globs
  • 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
  • Returns the callback used for operation progress. @param handle the context handle @return the currently set progress callback
  • Returns the callback used for operation progress. @param handle the context handle @return the currently set progress callback context
  • Returns the callback used for questions. @param handle the context handle @return the currently set question callback
  • Returns the callback used for questions. @param handle the context handle @return the currently set question callback context
  • Get the configured remote file siglevel. @param handle the context handle @return a \link alpm_siglevel_t \endlink bitfield of the siglevel
  • Returns the root path. Read-only. @param handle the context handle
  • Returns the user to switch to for sensitive operations. @return the user name
  • 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)
  • 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
  • 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
  • Removes an allowed package architecture. @param handle the context handle @param arch the architecture to remove
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • Sets the allowed package architecture. @param handle the context handle @param arches the architecture to set
  • 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)
  • 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)
  • Enable/disable checking free space before installing packages. @param handle the context handle @param checkspace 0 for disabled, 1 for enabled
  • 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)
  • 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)
  • 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)
  • Enables/disables the sandbox. @param handle the context handle @param disable_sandbox 0 for enabled, 1 for disabled @return 0 on success, -1 on error (pm_errno is set accordingly)
  • 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)
  • 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)
  • 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)
  • Sets the path to libalpm’s GnuPG home directory. @param handle the context handle @param gpgdir the gpgdir to set
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • 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)
  • 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
  • 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)
  • 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)
  • 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)
  • Sets the user to switch to for sensitive operations. @param handle the context handle @param sandboxuser the user to set
  • 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)
  • 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
  • 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
  • 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.
  • 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 0 if valid, -1 if an error occurred or signature is invalid
  • 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)
  • 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
  • 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
  • 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
  • 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
  • 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)
  • Returns the architecture for which the package was built. @param pkg a pointer to package @return a reference to an internal string
  • 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
  • Returns the package base name. @param pkg a pointer to package @return a reference to an internal string
  • Returns the base64 encoded package signature. @param pkg a pointer to package @return a reference to an internal string
  • Returns the build timestamp of the package. @param pkg a pointer to package @return the timestamp of the build time
  • 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.
  • 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.
  • 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.
  • 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.
  • Returns the package description. @param pkg a pointer to package @return a reference to an internal string
  • 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
  • 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
  • Returns the list of package groups. @param pkg a pointer to package @return a pointer to an internal list of strings.
  • Gets the handle of a package @param pkg a pointer to package @return the alpm handle that the package belongs to
  • Returns the install timestamp of the package. @param pkg a pointer to package @return the timestamp of the install time
  • Returns the installed size of the package. @param pkg a pointer to package @return the total size of files installed by the package.
  • Returns the list of package licenses. @param pkg a pointer to package @return a pointer to an internal list of strings.
  • 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.
  • 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
  • Returns the package name. @param pkg a pointer to package @return a reference to an internal string
  • 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.
  • Returns the origin of the package. @return an alpm_pkgfrom_t constant, -1 on error
  • Returns the packager’s name. @param pkg a pointer to package @return a reference to an internal string
  • 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.
  • Returns the package installation reason. @param pkg a pointer to package @return an enum member giving the install reason.
  • 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.
  • 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
  • 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.
  • 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.
  • Returns the package URL. @param pkg a pointer to package @return a reference to an internal string
  • Returns the method used to validate a package during install. @param pkg a pointer to package @return an enum member giving the validation method
  • 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
  • Gets the extended data field of a package. @param pkg a pointer to package @return a reference to a list of alpm_pkg_xdata_t objects
  • Returns whether the package has an install scriptlet. @return 0 if FALSE, TRUE otherwise
  • 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)
  • Close a package mtree file. @param pkg the local package to close the mtree of @param archive the archive to close
  • 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.
  • 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
  • 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)
  • 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
  • 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.
  • Register a sync database of packages. Databases can not be registered when there is an active transaction.
  • 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
  • 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)
  • Drop privileges by switching to a different user. @param handle the context handle @param sandboxuser the user to switch to @param sandbox_path if non-NULL, restrict writes to this filesystem path @return 0 on success, -1 on failure
  • 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
  • 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
  • Check for new version of pkg in syncdbs.
  • 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)
  • 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)
  • Returns a list of packages added by the transaction. @param handle the context handle @return a list of alpm_pkg_t structures
  • Returns the bitfield of flags for the current transaction. @param handle the context handle @return the bitfield of transaction flags
  • Returns the list of packages removed by the transaction. @param handle the context handle @return a list of alpm_pkg_t structures
  • 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)
  • Interrupt a transaction. @param handle the context handle @return 0 on success, -1 on error (pm_errno is set accordingly)
  • 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)
  • Release a transaction. @param handle the context handle @return 0 on success, -1 on error (pm_errno is set accordingly)
  • Remove the database lock file @param handle the context handle @return 0 on success, -1 on error
  • Unregister all package databases. Databases can not be unregistered while there is an active transaction.
  • Get the version of library. @return the library version, e.g. “6.0.4”

Type Aliases§

Unions§

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