libalpm
Arch Linux Package Manager Library
|
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <archive.h>
#include <archive_entry.h>
#include "util.h"
#include "log.h"
#include "alpm.h"
#include "alpm_list.h"
#include "package.h"
#include "handle.h"
#include "delta.h"
#include "deps.h"
#include "dload.h"
Go to the source code of this file.
Defines | |
#define | READ_NEXT() |
#define | READ_AND_STORE(f) |
#define | READ_AND_STORE_ALL(f) |
#define | READ_AND_SPLITDEP(f) |
Functions | |
int | alpm_db_update (int force, alpm_db_t *db) |
Update a package database. | |
alpm_db_t * | _alpm_db_register_sync (alpm_handle_t *handle, const char *treename, alpm_siglevel_t level) |
Variables | |
struct db_operations | sync_db_ops |
#define READ_AND_SPLITDEP | ( | f | ) |
do { \ if(_alpm_archive_fgets(archive, &buf) != ARCHIVE_OK) goto error; \ if(_alpm_strip_newline(buf.line) == 0) break; \ f = alpm_list_add(f, _alpm_splitdep(line)); \ } while(1) /* note the while(1) and not (0) */
#define READ_AND_STORE | ( | f | ) |
#define READ_AND_STORE_ALL | ( | f | ) |
do { \ char *linedup; \ if(_alpm_archive_fgets(archive, &buf) != ARCHIVE_OK) goto error; \ if(_alpm_strip_newline(buf.line) == 0) break; \ STRDUP(linedup, buf.line, goto error); \ f = alpm_list_add(f, linedup); \ } while(1) /* note the while(1) and not (0) */
#define READ_NEXT | ( | ) |
do { \ if(_alpm_archive_fgets(archive, &buf) != ARCHIVE_OK) goto error; \ line = buf.line; \ _alpm_strip_newline(line); \ } while(0)
alpm_db_t* _alpm_db_register_sync | ( | alpm_handle_t * | handle, |
const char * | treename, | ||
alpm_siglevel_t | level | ||
) |
Definition at line 608 of file be_sync.c.
References _alpm_db_new(), _alpm_log(), ALPM_ERR_DB_CREATE, ALPM_ERR_WRONG_ARGS, alpm_list_add(), ALPM_LOG_DEBUG, ALPM_SIG_USE_DEFAULT, __alpm_handle_t::dbs_sync, handle, __alpm_db_t::handle, __alpm_db_t::ops, RET_ERR, __alpm_db_t::siglevel, and sync_db_ops.
Referenced by alpm_db_register_sync().
struct db_operations sync_db_ops |
{ .validate = sync_db_validate, .populate = sync_db_populate, .unregister = _alpm_db_unregister, }
Definition at line 602 of file be_sync.c.
Referenced by _alpm_db_register_sync().