libalpm
Arch Linux Package Manager Library
|
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <archive.h>
#include <archive_entry.h>
#include "alpm_list.h"
#include "alpm.h"
#include "util.h"
#include "log.h"
#include "handle.h"
#include "package.h"
#include "deps.h"
Go to the source code of this file.
Data Structures | |
struct | package_changelog |
Functions | |
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_load (alpm_handle_t *handle, const char *filename, int full, alpm_siglevel_t level, alpm_pkg_t **pkg) |
Create a package from a file. |
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().
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().