libalpm
Arch Linux Package Manager Library
|
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <limits.h>
#include <unistd.h>
#include <archive.h>
#include <archive_entry.h>
#include "util.h"
#include "log.h"
#include "libarchive-compat.h"
#include "alpm.h"
#include "alpm_list.h"
#include "package.h"
#include "handle.h"
#include "deps.h"
#include "dload.h"
#include "filelist.h"
Macros | |
#define | READ_NEXT() |
#define | READ_AND_STORE(f) |
#define | READ_AND_STORE_ALL(f) |
#define | READ_AND_SPLITDEP(f) |
Functions | |
static char * | get_sync_dir (alpm_handle_t *handle) |
static int | sync_db_validate (alpm_db_t *db) |
int | alpm_db_update (alpm_handle_t *handle, alpm_list_t *dbs, int force) |
Update package databases. | |
static int | sync_db_read (alpm_db_t *db, struct archive *archive, struct archive_entry *entry, alpm_pkg_t **likely_pkg) |
static int | _sync_get_validation (alpm_pkg_t *pkg) |
static const struct pkg_operations * | get_sync_pkg_ops (void) |
Package sync operations struct accessor. | |
static alpm_pkg_t * | load_pkg_for_entry (alpm_db_t *db, const char *entryname, const char **entry_filename, alpm_pkg_t *likely_pkg) |
static size_t | estimate_package_count (struct stat *st, struct archive *archive) |
static int | sync_db_populate (alpm_db_t *db) |
Variables | |
struct db_operations | sync_db_ops |
#define READ_AND_SPLITDEP | ( | f | ) |
Referenced by sync_db_read().
#define READ_AND_STORE | ( | f | ) |
Referenced by sync_db_read().
#define READ_AND_STORE_ALL | ( | f | ) |
Referenced by sync_db_read().
#define READ_NEXT | ( | ) |
Referenced by sync_db_read().
|
static |
References ALPM_PKG_VALIDATION_MD5SUM, ALPM_PKG_VALIDATION_NONE, ALPM_PKG_VALIDATION_SHA256SUM, and ALPM_PKG_VALIDATION_SIGNATURE.
Referenced by get_sync_pkg_ops().
|
static |
Referenced by sync_db_populate().
|
static |
References _, ALPM_ERR_MEMORY, ALPM_ERR_SYSTEM, ALPM_LOG_DEBUG, ALPM_LOG_WARNING, MALLOC, and RET_ERR.
Referenced by alpm_db_update().
|
static |
Package sync operations struct accessor.
We implement this as a method because we want to reuse the majority of the default_pkg_ops struct and add only a few operations of our own on top.
References _sync_get_validation(), default_pkg_ops, and pkg_operations::get_validation.
Referenced by load_pkg_for_entry().
|
static |
References _, ALPM_ERR_MEMORY, ALPM_ERR_PKG_INVALID, ALPM_LOG_ERROR, ALPM_LOG_FUNCTION, ALPM_PKG_FROM_SYNCDB, get_sync_pkg_ops(), and RET_ERR.
Referenced by sync_db_read().
|
static |
|
static |
References _, alpm_list_append(), ALPM_LOG_DEBUG, ALPM_LOG_ERROR, ALPM_LOG_FUNCTION, ALPM_LOG_WARNING, alpm_list_t::data, error, FREE, FREELIST, archive_read_buffer::line, load_pkg_for_entry(), archive_read_buffer::max_line_size, alpm_list_t::next, READ_AND_SPLITDEP, READ_AND_STORE, READ_AND_STORE_ALL, READ_NEXT, archive_read_buffer::real_line_size, REALLOC, archive_read_buffer::ret, and STRDUP.
Referenced by sync_db_populate().
|
static |
References alpm_db_get_siglevel(), ALPM_ERR_DB_INVALID_SIG, ALPM_EVENT_DATABASE_MISSING, ALPM_SIG_DATABASE, ALPM_SIG_DATABASE_MARGINAL_OK, ALPM_SIG_DATABASE_OPTIONAL, ALPM_SIG_DATABASE_UNKNOWN_OK, alpm_siglist_cleanup(), DB_STATUS_EXISTS, DB_STATUS_INVALID, DB_STATUS_MISSING, DB_STATUS_VALID, EVENT, and alpm_event_database_missing_t::type.
Referenced by alpm_db_update().
struct db_operations sync_db_ops |