libalpm
Arch Linux Package Manager Library
db.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <regex.h>
#include "db.h"
#include "alpm_list.h"
#include "log.h"
#include "util.h"
#include "handle.h"
#include "alpm.h"
#include "package.h"
#include "group.h"
Include dependency graph for db.c:

Functions

alpm_db_t * alpm_register_syncdb (alpm_handle_t *handle, const char *treename, int siglevel)
 Register a sync database of packages.
 
int alpm_unregister_all_syncdbs (alpm_handle_t *handle)
 Unregister all package databases.
 
int alpm_db_unregister (alpm_db_t *db)
 Unregister a package database.
 
alpm_list_talpm_db_get_cache_servers (const alpm_db_t *db)
 Get the list of cache servers assigned to this db.
 
int alpm_db_set_cache_servers (alpm_db_t *db, alpm_list_t *cache_servers)
 Sets the list of cache servers for the database to use.
 
alpm_list_talpm_db_get_servers (const alpm_db_t *db)
 Get the list of servers assigned to this db.
 
int alpm_db_set_servers (alpm_db_t *db, alpm_list_t *servers)
 Sets the list of servers for the database to use.
 
static char * sanitize_url (const char *url)
 
int alpm_db_add_cache_server (alpm_db_t *db, const char *url)
 Add a download cache server to a database.
 
int alpm_db_add_server (alpm_db_t *db, const char *url)
 Add a download server to a database.
 
int alpm_db_remove_cache_server (alpm_db_t *db, const char *url)
 Remove a download cache server from a database.
 
int alpm_db_remove_server (alpm_db_t *db, const char *url)
 Remove a download server from a database.
 
alpm_handle_t * alpm_db_get_handle (alpm_db_t *db)
 Get the handle of a package database.
 
const char * alpm_db_get_name (const alpm_db_t *db)
 Get the name of a package database.
 
int alpm_db_get_siglevel (alpm_db_t *db)
 Get the signature verification level for a database.
 
int alpm_db_get_valid (alpm_db_t *db)
 Check the validity of a database.
 
alpm_pkg_t * alpm_db_get_pkg (alpm_db_t *db, const char *name)
 Get a package entry from a package database.
 
alpm_list_talpm_db_get_pkgcache (alpm_db_t *db)
 Get the package cache of a package database.
 
alpm_group_talpm_db_get_group (alpm_db_t *db, const char *name)
 Get a group entry from a package database.
 
alpm_list_talpm_db_get_groupcache (alpm_db_t *db)
 Get the group cache of a package database.
 
int alpm_db_search (alpm_db_t *db, const alpm_list_t *needles, alpm_list_t **ret)
 Searches a database with regular expressions.
 
int alpm_db_set_usage (alpm_db_t *db, int usage)
 Sets the usage of a database.
 
int alpm_db_get_usage (alpm_db_t *db, int *usage)
 Gets the usage of a database.
 
static int load_pkgcache (alpm_db_t *db)
 
static void free_groupcache (alpm_db_t *db)
 
static int load_grpcache (alpm_db_t *db)
 

Function Documentation

◆ free_groupcache()

static void free_groupcache ( alpm_db_t * db)
static

◆ load_grpcache()

◆ load_pkgcache()

static int load_pkgcache ( alpm_db_t * db)
static

◆ sanitize_url()

static char * sanitize_url ( const char * url)
static