db.c File Reference

#include "config.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <stdint.h>
#include <sys/stat.h>
#include <dirent.h>
#include <regex.h>
#include <time.h>
#include "db.h"
#include "alpm_list.h"
#include "log.h"
#include "util.h"
#include "error.h"
#include "server.h"
#include "handle.h"
#include "cache.h"
#include "alpm.h"

Include dependency graph for db.c:

Go to the source code of this file.

Functions

pmdb_talpm_db_register_sync (const char *treename)
pmdb_talpm_db_register_local (void)
int alpm_db_unregister_all (void)
int alpm_db_unregister (pmdb_t *db)
int alpm_db_setserver (pmdb_t *db, const char *url)
int alpm_db_update (int force, pmdb_t *db)
const char * alpm_db_get_name (const pmdb_t *db)
const char * alpm_db_get_url (const pmdb_t *db)
pmpkg_talpm_db_get_pkg (pmdb_t *db, const char *name)
alpm_list_talpm_db_getpkgcache (pmdb_t *db)
alpm_list_talpm_db_whatprovides (pmdb_t *db, const char *name)
pmgrp_talpm_db_readgrp (pmdb_t *db, const char *name)
alpm_list_talpm_db_getgrpcache (pmdb_t *db)
alpm_list_talpm_db_search (pmdb_t *db, const alpm_list_t *needles)
pmdb_t_alpm_db_new (const char *dbpath, const char *treename)
void _alpm_db_free (pmdb_t *db)
int _alpm_db_cmp (const void *db1, const void *db2)
alpm_list_t_alpm_db_search (pmdb_t *db, const alpm_list_t *needles)
pmdb_t_alpm_db_register_local (void)
pmdb_t_alpm_db_register_sync (const char *treename)
int _alpm_prov_cmp (const void *provision, const void *needle)
alpm_list_t_alpm_db_whatprovides (pmdb_t *db, const char *package)


Function Documentation

int _alpm_db_cmp ( const void *  db1,
const void *  db2 
)

Definition at line 473 of file db.c.

References ALPM_LOG_FUNC.

Referenced by alpm_db_unregister().

Here is the caller graph for this function:

void _alpm_db_free ( pmdb_t db  ) 

Definition at line 454 of file db.c.

References _alpm_db_free_pkgcache(), _alpm_server_free(), alpm_list_free(), alpm_list_next(), ALPM_LOG_FUNC, __alpm_list_t::data, FREE, __pmdb_t::path, and __pmdb_t::servers.

Referenced by _alpm_db_register_local(), and _alpm_db_register_sync().

Here is the call graph for this function:

Here is the caller graph for this function:

pmdb_t* _alpm_db_new ( const char *  dbpath,
const char *  treename 
)

Definition at line 437 of file db.c.

References ALPM_LOG_FUNC, CALLOC, __pmdb_t::path, PM_ERR_MEMORY, RET_ERR, and __pmdb_t::treename.

Referenced by _alpm_db_register_local(), and _alpm_db_register_sync().

Here is the caller graph for this function:

pmdb_t* _alpm_db_register_local ( void   ) 

Definition at line 539 of file db.c.

References _, _alpm_db_free(), _alpm_db_new(), _alpm_db_open(), _alpm_log(), _alpm_makepath(), ALPM_LOG_FUNC, alpm_option_get_dbpath(), _pmhandle_t::db_local, handle, PM_ERR_DB_CREATE, PM_ERR_DB_NOT_NULL, PM_ERR_DB_OPEN, PM_ERR_SYSTEM, PM_LOG_DEBUG, PM_LOG_ERROR, PM_LOG_WARNING, and RET_ERR.

Referenced by alpm_db_register_local().

Here is the call graph for this function:

Here is the caller graph for this function:

pmdb_t* _alpm_db_register_sync ( const char *  treename  ) 

Definition at line 586 of file db.c.

References _, _alpm_db_free(), _alpm_db_new(), _alpm_db_open(), _alpm_log(), _alpm_makepath(), alpm_list_add(), ALPM_LOG_FUNC, alpm_option_get_dbpath(), __alpm_list_t::data, _pmhandle_t::dbs_sync, handle, __alpm_list_t::next, PM_ERR_DB_CREATE, PM_ERR_DB_OPEN, PM_ERR_SYSTEM, PM_LOG_DEBUG, PM_LOG_ERROR, RET_ERR, and __pmdb_t::treename.

Referenced by alpm_db_register_sync().

Here is the call graph for this function:

Here is the caller graph for this function:

alpm_list_t* _alpm_db_search ( pmdb_t db,
const alpm_list_t needles 
)

Definition at line 479 of file db.c.

References _alpm_db_get_pkgcache(), _alpm_log(), alpm_list_add(), ALPM_LOG_FUNC, alpm_pkg_get_desc(), alpm_pkg_get_name(), alpm_pkg_get_provides(), __alpm_list_t::data, __alpm_list_t::next, PM_ERR_INVALID_REGEX, PM_LOG_DEBUG, and RET_ERR.

Referenced by alpm_db_search().

Here is the call graph for this function:

Here is the caller graph for this function:

alpm_list_t* _alpm_db_whatprovides ( pmdb_t db,
const char *  package 
)

Definition at line 663 of file db.c.

References _alpm_db_get_pkgcache(), _alpm_prov_cmp(), alpm_list_add(), alpm_list_find(), ALPM_LOG_FUNC, alpm_pkg_get_provides(), __alpm_list_t::data, and __alpm_list_t::next.

Referenced by alpm_db_whatprovides().

Here is the call graph for this function:

Here is the caller graph for this function:

int _alpm_prov_cmp ( const void *  provision,
const void *  needle 
)

Definition at line 646 of file db.c.

Referenced by _alpm_db_whatprovides(), and _alpm_sync_prepare().

Here is the caller graph for this function:


Generated on Mon Jan 14 23:56:04 2008 for libalpm by  doxygen 1.5.4