libalpm
Arch Linux Package Manager Library
|
Go to the source code of this file.
Data Structures | |
struct | pkg_operations |
Package operations struct. More... | |
struct | __alpm_pkg_t |
Functions | |
alpm_file_t * | _alpm_file_copy (alpm_file_t *dest, const alpm_file_t *src) |
int | _alpm_files_cmp (const void *f1, const void *f2) |
alpm_pkg_t * | _alpm_pkg_new (void) |
int | _alpm_pkg_dup (alpm_pkg_t *pkg, alpm_pkg_t **new_ptr) |
Duplicate a package data struct. | |
void | _alpm_pkg_free (alpm_pkg_t *pkg) |
void | _alpm_pkg_free_trans (alpm_pkg_t *pkg) |
int | _alpm_pkg_validate_internal (alpm_handle_t *handle, const char *pkgfile, alpm_pkg_t *syncpkg, alpm_siglevel_t level, alpm_siglist_t **sigdata) |
Validate a package. | |
alpm_pkg_t * | _alpm_pkg_load_internal (alpm_handle_t *handle, const char *pkgfile, int full) |
Load a package and create the corresponding alpm_pkg_t struct. | |
int | _alpm_pkg_cmp (const void *p1, const void *p2) |
int | _alpm_pkg_compare_versions (alpm_pkg_t *local_pkg, alpm_pkg_t *pkg) |
alpm_pkg_t * | _alpm_pkg_find (alpm_list_t *haystack, const char *needle) |
int | _alpm_pkg_should_ignore (alpm_handle_t *handle, alpm_pkg_t *pkg) |
Test if a package should be ignored. | |
Variables | |
struct pkg_operations | default_pkg_ops |
The standard package operations struct. |
alpm_file_t* _alpm_file_copy | ( | alpm_file_t * | dest, |
const alpm_file_t * | src | ||
) |
Definition at line 434 of file lib/libalpm/package.c.
References _alpm_file_t::mode, _alpm_file_t::name, _alpm_file_t::size, and STRDUP.
Referenced by _alpm_pkg_dup().
int _alpm_files_cmp | ( | const void * | f1, |
const void * | f2 | ||
) |
Definition at line 446 of file lib/libalpm/package.c.
References _alpm_file_t::name.
int _alpm_pkg_cmp | ( | const void * | p1, |
const void * | p2 | ||
) |
Definition at line 642 of file lib/libalpm/package.c.
References __alpm_pkg_t::name.
Referenced by _alpm_outerconflicts(), and _alpm_sync_prepare().
int _alpm_pkg_compare_versions | ( | alpm_pkg_t * | local_pkg, |
alpm_pkg_t * | pkg | ||
) |
Definition at line 635 of file lib/libalpm/package.c.
References alpm_pkg_vercmp(), and __alpm_pkg_t::version.
Referenced by _alpm_resolvedeps(), alpm_add_pkg(), and alpm_sync_newversion().
int _alpm_pkg_dup | ( | alpm_pkg_t * | pkg, |
alpm_pkg_t ** | new_ptr | ||
) |
Duplicate a package data struct.
pkg | the package to duplicate |
new_ptr | location to store duplicated package pointer |
Definition at line 477 of file lib/libalpm/package.c.
References _, _alpm_backup_dup(), _alpm_delta_dup(), _alpm_file_copy(), _alpm_log(), _alpm_pkg_free(), ALPM_ERR_MEMORY, ALPM_ERR_PKG_INVALID, ALPM_ERR_WRONG_ARGS, alpm_list_add(), alpm_list_strdup(), ALPM_LOG_WARNING, __alpm_pkg_t::arch, __alpm_pkg_t::backup, __alpm_pkg_t::builddate, CALLOC, __alpm_pkg_t::conflicts, _alpm_filelist_t::count, __alpm_list_t::data, __alpm_pkg_t::db, __alpm_pkg_t::deltas, __alpm_pkg_t::depends, __alpm_pkg_t::desc, __alpm_pkg_t::file, __alpm_pkg_t::filename, __alpm_pkg_t::files, _alpm_filelist_t::files, pkg_operations::force_load, __alpm_pkg_t::groups, __alpm_pkg_t::handle, __alpm_pkg_t::infolevel, __alpm_pkg_t::installdate, __alpm_pkg_t::isize, __alpm_pkg_t::licenses, MALLOC, __alpm_pkg_t::md5sum, __alpm_pkg_t::name, __alpm_pkg_t::name_hash, __alpm_list_t::next, __alpm_pkg_t::ops, __alpm_pkg_t::optdepends, __alpm_pkg_t::origin, __alpm_pkg_t::origin_data, __alpm_pkg_t::packager, PKG_FROM_FILE, __alpm_handle_t::pm_errno, __alpm_pkg_t::provides, __alpm_pkg_t::reason, __alpm_pkg_t::replaces, RET_ERR, __alpm_pkg_t::scriptlet, __alpm_pkg_t::sha256sum, __alpm_pkg_t::size, STRDUP, __alpm_pkg_t::url, and __alpm_pkg_t::version.
Referenced by _alpm_db_add_pkgincache(), _alpm_recursedeps(), _alpm_sync_prepare(), and alpm_remove_pkg().
alpm_pkg_t* _alpm_pkg_find | ( | alpm_list_t * | haystack, |
const char * | needle | ||
) |
Definition at line 652 of file lib/libalpm/package.c.
References _alpm_hash_sdbm(), __alpm_list_t::data, __alpm_pkg_t::name, __alpm_pkg_t::name_hash, and __alpm_list_t::next.
Referenced by _alpm_resolvedeps(), _alpm_sync_prepare(), alpm_add_pkg(), alpm_checkdeps(), alpm_find_group_pkgs(), alpm_remove_pkg(), and alpm_sync_sysupgrade().
void _alpm_pkg_free | ( | alpm_pkg_t * | pkg | ) |
Definition at line 570 of file lib/libalpm/package.c.
References _alpm_backup_free(), _alpm_delta_free(), alpm_list_free(), alpm_list_free_inner(), __alpm_pkg_t::arch, __alpm_pkg_t::backup, __alpm_pkg_t::base64_sig, __alpm_pkg_t::conflicts, _alpm_filelist_t::count, __alpm_pkg_t::delta_path, __alpm_pkg_t::deltas, __alpm_pkg_t::depends, __alpm_pkg_t::desc, __alpm_pkg_t::file, __alpm_pkg_t::filename, __alpm_pkg_t::files, _alpm_filelist_t::files, FREE, FREELIST, __alpm_pkg_t::groups, __alpm_pkg_t::licenses, __alpm_pkg_t::md5sum, __alpm_pkg_t::name, _alpm_file_t::name, __alpm_pkg_t::optdepends, __alpm_pkg_t::origin, __alpm_pkg_t::origin_data, __alpm_pkg_t::packager, PKG_FROM_FILE, __alpm_pkg_t::provides, __alpm_pkg_t::removes, __alpm_pkg_t::replaces, __alpm_pkg_t::sha256sum, __alpm_pkg_t::url, and __alpm_pkg_t::version.
Referenced by _alpm_db_free_pkgcache(), _alpm_db_remove_pkgfromcache(), _alpm_pkg_dup(), _alpm_pkg_free_trans(), _alpm_pkg_load_internal(), _alpm_trans_free(), and alpm_pkg_free().
void _alpm_pkg_free_trans | ( | alpm_pkg_t * | pkg | ) |
Definition at line 619 of file lib/libalpm/package.c.
References _alpm_pkg_free(), alpm_list_free(), __alpm_pkg_t::origin, PKG_FROM_FILE, and __alpm_pkg_t::removes.
Referenced by _alpm_trans_free().
alpm_pkg_t* _alpm_pkg_load_internal | ( | alpm_handle_t * | handle, |
const char * | pkgfile, | ||
int | full | ||
) |
Load a package and create the corresponding alpm_pkg_t struct.
handle | the context handle |
pkgfile | path to the package file |
full | whether to stop the load after metadata is read or continue through the full archive |
Definition at line 377 of file be_package.c.
References _, _alpm_log(), _alpm_open_archive(), _alpm_pkg_free(), _alpm_pkg_new(), ALLOC_FAIL, ALPM_ERR_LIBARCHIVE, ALPM_ERR_MEMORY, ALPM_ERR_PKG_INVALID, ALPM_ERR_PKG_NOT_FOUND, ALPM_ERR_PKG_OPEN, ALPM_ERR_WRONG_ARGS, ALPM_LOG_DEBUG, ALPM_LOG_ERROR, CLOSE, config, _alpm_filelist_t::count, __alpm_pkg_t::file, __alpm_pkg_t::filename, __alpm_pkg_t::files, _alpm_filelist_t::files, handle, __alpm_pkg_t::handle, __alpm_pkg_t::infolevel, INFRQ_BASE, INFRQ_DESC, INFRQ_FILES, INFRQ_SCRIPTLET, _alpm_file_t::mode, __alpm_pkg_t::name, __alpm_pkg_t::ops, __alpm_pkg_t::origin, __alpm_pkg_t::origin_data, PKG_FROM_FILE, __alpm_handle_t::pm_errno, archive_read_buffer::ret, RET_ERR, __alpm_pkg_t::scriptlet, __alpm_pkg_t::size, _alpm_file_t::size, STRDUP, and __alpm_pkg_t::version.
Referenced by alpm_pkg_load().
alpm_pkg_t* _alpm_pkg_new | ( | void | ) |
Definition at line 453 of file lib/libalpm/package.c.
References CALLOC.
Referenced by _alpm_pkg_load_internal().
int _alpm_pkg_should_ignore | ( | alpm_handle_t * | handle, |
alpm_pkg_t * | pkg | ||
) |
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.
handle | the context handle |
pkg | the package to test |
Definition at line 690 of file lib/libalpm/package.c.
References _alpm_fnmatch(), alpm_list_find(), alpm_pkg_get_groups(), __alpm_list_t::data, __alpm_handle_t::ignoregroup, __alpm_handle_t::ignorepkg, __alpm_pkg_t::name, and __alpm_list_t::next.
Referenced by alpm_find_group_pkgs().
int _alpm_pkg_validate_internal | ( | alpm_handle_t * | handle, |
const char * | pkgfile, | ||
alpm_pkg_t * | syncpkg, | ||
alpm_siglevel_t | level, | ||
alpm_siglist_t ** | sigdata | ||
) |
Validate a package.
handle | the context handle |
pkgfile | path to the package file |
syncpkg | package object to load verification data from (md5sum, sha256sum, and/or base64 signature) |
level | the required level of signature verification |
sigdata | signature data from the package to pass back |
Definition at line 307 of file be_package.c.
References _alpm_access(), _alpm_check_pgp_helper(), _alpm_log(), _alpm_sigpath(), _alpm_test_checksum(), ALPM_CSUM_MD5, ALPM_CSUM_SHA256, ALPM_ERR_PKG_INVALID_CHECKSUM, ALPM_ERR_PKG_INVALID_SIG, ALPM_ERR_PKG_NOT_FOUND, ALPM_ERR_WRONG_ARGS, ALPM_LOG_DEBUG, ALPM_SIG_PACKAGE, ALPM_SIG_PACKAGE_MARGINAL_OK, ALPM_SIG_PACKAGE_OPTIONAL, ALPM_SIG_PACKAGE_UNKNOWN_OK, __alpm_pkg_t::base64_sig, __alpm_pkg_t::md5sum, __alpm_handle_t::pm_errno, RET_ERR, and __alpm_pkg_t::sha256sum.
Referenced by alpm_pkg_load().