summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2011-06-28 14:11:43 +1000
committerAllan McRae <allan@archlinux.org>2011-06-28 14:16:12 +1000
commit939d5a9511b2dcbb07390ecfcd23528d8034709b (patch)
tree93487183da9dfdad8c33c7fa8f6929fd810a1c29 /src
parent64c1cf792184661a1d3dd73329f129172e688f17 (diff)
downloadpacman-939d5a9511b2dcbb07390ecfcd23528d8034709b.tar.xz
Rename pmdb_t to alpm_db_t
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/conf.c4
-rw-r--r--src/pacman/database.c2
-rw-r--r--src/pacman/deptest.c2
-rw-r--r--src/pacman/query.c10
-rw-r--r--src/pacman/remove.c2
-rw-r--r--src/pacman/sync.c40
-rw-r--r--src/pacman/util.c8
-rw-r--r--src/util/cleanupdelta.c2
-rw-r--r--src/util/testdb.c4
9 files changed, 37 insertions, 37 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 0e7429eb..d3dbc9da 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -378,7 +378,7 @@ static int _parse_options(const char *key, char *value,
return 0;
}
-static int _add_mirror(pmdb_t *db, char *value)
+static int _add_mirror(alpm_db_t *db, char *value)
{
const char *dbname = alpm_db_get_name(db);
/* let's attempt a replacement for the current repo */
@@ -535,7 +535,7 @@ static int finish_section(struct section_t *section, int parse_options)
{
int ret = 0;
alpm_list_t *i;
- pmdb_t *db;
+ alpm_db_t *db;
pm_printf(PM_LOG_DEBUG, "config: finish section '%s'\n", section->name);
diff --git a/src/pacman/database.c b/src/pacman/database.c
index 6a06ca33..b7490cea 100644
--- a/src/pacman/database.c
+++ b/src/pacman/database.c
@@ -40,7 +40,7 @@
int pacman_database(alpm_list_t *targets)
{
alpm_list_t *i;
- pmdb_t *db_local;
+ alpm_db_t *db_local;
int retval = 0;
alpm_pkgreason_t reason;
diff --git a/src/pacman/deptest.c b/src/pacman/deptest.c
index 99abd72d..0055c37e 100644
--- a/src/pacman/deptest.c
+++ b/src/pacman/deptest.c
@@ -33,7 +33,7 @@ int pacman_deptest(alpm_list_t *targets)
{
alpm_list_t *i;
alpm_list_t *deps = NULL;
- pmdb_t *localdb = alpm_option_get_localdb(config->handle);
+ alpm_db_t *localdb = alpm_option_get_localdb(config->handle);
for(i = targets; i; i = alpm_list_next(i)) {
char *target = alpm_list_getdata(i);
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 62472cb7..e0ec2c68 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -113,7 +113,7 @@ static int query_fileowner(alpm_list_t *targets)
char *append;
size_t max_length;
alpm_list_t *t;
- pmdb_t *db_local;
+ alpm_db_t *db_local;
/* This code is here for safety only */
if(targets == NULL) {
@@ -240,7 +240,7 @@ static int query_search(alpm_list_t *targets)
{
alpm_list_t *i, *searchlist;
int freelist;
- pmdb_t *db_local = alpm_option_get_localdb(config->handle);
+ alpm_db_t *db_local = alpm_option_get_localdb(config->handle);
/* if we have a targets list, search for packages matching it */
if(targets) {
@@ -299,7 +299,7 @@ static int query_group(alpm_list_t *targets)
alpm_list_t *i, *j;
char *grpname = NULL;
int ret = 0;
- pmdb_t *db_local = alpm_option_get_localdb(config->handle);
+ alpm_db_t *db_local = alpm_option_get_localdb(config->handle);
if(targets == NULL) {
for(j = alpm_db_get_grpcache(db_local); j; j = alpm_list_next(j)) {
@@ -343,7 +343,7 @@ static int is_foreign(pmpkg_t *pkg)
int match = 0;
for(j = sync_dbs; j; j = alpm_list_next(j)) {
- pmdb_t *db = alpm_list_getdata(j);
+ alpm_db_t *db = alpm_list_getdata(j);
pmpkg_t *findpkg = alpm_db_get_pkg(db, pkgname);
if(findpkg) {
match = 1;
@@ -483,7 +483,7 @@ int pacman_query(alpm_list_t *targets)
int match = 0;
alpm_list_t *i;
pmpkg_t *pkg = NULL;
- pmdb_t *db_local;
+ alpm_db_t *db_local;
/* First: operations that do not require targets */
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 60027ae2..f30f5068 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -34,7 +34,7 @@
static int remove_target(const char *target)
{
pmpkg_t *info;
- pmdb_t *db_local = alpm_option_get_localdb(config->handle);
+ alpm_db_t *db_local = alpm_option_get_localdb(config->handle);
alpm_list_t *p;
if((info = alpm_db_get_pkg(db_local, target)) != NULL) {
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index fa30b8da..9dde7605 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -95,7 +95,7 @@ static int sync_cleandb(const char *dbpath, int keep_used)
len = strlen(dname);
char *dbname = strndup(dname, len - 3);
for(i = syncdbs; i && !found; i = alpm_list_next(i)) {
- pmdb_t *db = alpm_list_getdata(i);
+ alpm_db_t *db = alpm_list_getdata(i);
found = !strcmp(dbname, alpm_db_get_name(db));
}
free(dbname);
@@ -146,7 +146,7 @@ static int sync_cleancache(int level)
{
alpm_list_t *i;
alpm_list_t *sync_dbs = alpm_option_get_syncdbs(config->handle);
- pmdb_t *db_local = alpm_option_get_localdb(config->handle);
+ alpm_db_t *db_local = alpm_option_get_localdb(config->handle);
alpm_list_t *cachedirs = alpm_option_get_cachedirs(config->handle);
int ret = 0;
@@ -249,7 +249,7 @@ static int sync_cleancache(int level)
alpm_list_t *j;
/* check if this package is in a sync DB */
for(j = sync_dbs; j && delete; j = alpm_list_next(j)) {
- pmdb_t *db = alpm_list_getdata(j);
+ alpm_db_t *db = alpm_list_getdata(j);
pkg = alpm_db_get_pkg(db, local_name);
if(pkg != NULL && alpm_pkg_vercmp(local_version,
alpm_pkg_get_version(pkg)) == 0) {
@@ -284,7 +284,7 @@ static int sync_synctree(int level, alpm_list_t *syncs)
int success = 0, ret;
for(i = syncs; i; i = alpm_list_next(i)) {
- pmdb_t *db = alpm_list_getdata(i);
+ alpm_db_t *db = alpm_list_getdata(i);
ret = alpm_db_update((level < 2 ? 0 : 1), db);
if(ret < 0) {
@@ -308,7 +308,7 @@ static int sync_synctree(int level, alpm_list_t *syncs)
return (success > 0);
}
-static void print_installed(pmdb_t *db_local, pmpkg_t *pkg)
+static void print_installed(alpm_db_t *db_local, pmpkg_t *pkg)
{
const char *pkgname = alpm_pkg_get_name(pkg);
const char *pkgver = alpm_pkg_get_version(pkg);
@@ -329,10 +329,10 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets)
alpm_list_t *i, *j, *ret;
int freelist;
int found = 0;
- pmdb_t *db_local = alpm_option_get_localdb(config->handle);
+ alpm_db_t *db_local = alpm_option_get_localdb(config->handle);
for(i = syncs; i; i = alpm_list_next(i)) {
- pmdb_t *db = alpm_list_getdata(i);
+ alpm_db_t *db = alpm_list_getdata(i);
/* if we have a targets list, search for packages matching it */
if(targets) {
ret = alpm_db_search(db, targets);
@@ -397,7 +397,7 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets)
for(i = targets; i; i = alpm_list_next(i)) {
const char *grpname = alpm_list_getdata(i);
for(j = syncs; j; j = alpm_list_next(j)) {
- pmdb_t *db = alpm_list_getdata(j);
+ alpm_db_t *db = alpm_list_getdata(j);
pmgrp_t *grp = alpm_db_readgrp(db, grpname);
if(grp) {
@@ -415,7 +415,7 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets)
}
} else {
for(i = syncs; i; i = alpm_list_next(i)) {
- pmdb_t *db = alpm_list_getdata(i);
+ alpm_db_t *db = alpm_list_getdata(i);
for(j = alpm_db_get_grpcache(db); j; j = alpm_list_next(j)) {
pmgrp_t *grp = alpm_list_getdata(j);
@@ -451,7 +451,7 @@ static int sync_info(alpm_list_t *syncs, alpm_list_t *targets)
strncpy(target, i->data, 512);
pkgstr = strchr(target, '/');
if(pkgstr) {
- pmdb_t *db = NULL;
+ alpm_db_t *db = NULL;
repo = target;
*pkgstr = '\0';
++pkgstr;
@@ -489,7 +489,7 @@ static int sync_info(alpm_list_t *syncs, alpm_list_t *targets)
pkgstr = target;
for(j = syncs; j; j = alpm_list_next(j)) {
- pmdb_t *db = alpm_list_getdata(j);
+ alpm_db_t *db = alpm_list_getdata(j);
for(k = alpm_db_get_pkgcache(db); k; k = alpm_list_next(k)) {
pmpkg_t *pkg = alpm_list_getdata(k);
@@ -510,7 +510,7 @@ static int sync_info(alpm_list_t *syncs, alpm_list_t *targets)
}
} else {
for(i = syncs; i; i = alpm_list_next(i)) {
- pmdb_t *db = alpm_list_getdata(i);
+ alpm_db_t *db = alpm_list_getdata(i);
for(j = alpm_db_get_pkgcache(db); j; j = alpm_list_next(j)) {
pmpkg_t *pkg = alpm_list_getdata(j);
@@ -525,15 +525,15 @@ static int sync_info(alpm_list_t *syncs, alpm_list_t *targets)
static int sync_list(alpm_list_t *syncs, alpm_list_t *targets)
{
alpm_list_t *i, *j, *ls = NULL;
- pmdb_t *db_local = alpm_option_get_localdb(config->handle);
+ alpm_db_t *db_local = alpm_option_get_localdb(config->handle);
if(targets) {
for(i = targets; i; i = alpm_list_next(i)) {
const char *repo = alpm_list_getdata(i);
- pmdb_t *db = NULL;
+ alpm_db_t *db = NULL;
for(j = syncs; j; j = alpm_list_next(j)) {
- pmdb_t *d = alpm_list_getdata(j);
+ alpm_db_t *d = alpm_list_getdata(j);
if(strcmp(repo, alpm_db_get_name(d)) == 0) {
db = d;
@@ -555,7 +555,7 @@ static int sync_list(alpm_list_t *syncs, alpm_list_t *targets)
}
for(i = ls; i; i = alpm_list_next(i)) {
- pmdb_t *db = alpm_list_getdata(i);
+ alpm_db_t *db = alpm_list_getdata(i);
for(j = alpm_db_get_pkgcache(db); j; j = alpm_list_next(j)) {
pmpkg_t *pkg = alpm_list_getdata(j);
@@ -580,7 +580,7 @@ static int sync_list(alpm_list_t *syncs, alpm_list_t *targets)
static alpm_list_t *syncfirst(void) {
alpm_list_t *i, *res = NULL;
- pmdb_t *db_local = alpm_option_get_localdb(config->handle);
+ alpm_db_t *db_local = alpm_option_get_localdb(config->handle);
alpm_list_t *syncdbs = alpm_option_get_syncdbs(config->handle);
for(i = config->syncfirst; i; i = alpm_list_next(i)) {
@@ -598,11 +598,11 @@ static alpm_list_t *syncfirst(void) {
return res;
}
-static pmdb_t *get_db(const char *dbname)
+static alpm_db_t *get_db(const char *dbname)
{
alpm_list_t *i;
for(i = alpm_option_get_syncdbs(config->handle); i; i = i->next) {
- pmdb_t *db = i->data;
+ alpm_db_t *db = i->data;
if(strcmp(alpm_db_get_name(db), dbname) == 0) {
return db;
}
@@ -705,7 +705,7 @@ static int process_target(char *target)
alpm_list_t *dblist = NULL;
if(targname) {
- pmdb_t *db = NULL;
+ alpm_db_t *db = NULL;
*targname = '\0';
targname++;
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 75e67170..cdf8b11a 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -666,7 +666,7 @@ static alpm_list_t *create_verbose_row(pmpkg_t *pkg, int install)
double size;
const char *label;
alpm_list_t *ret = NULL;
- pmdb_t *ldb = alpm_option_get_localdb(config->handle);
+ alpm_db_t *ldb = alpm_option_get_localdb(config->handle);
/* a row consists of the package name, */
pm_asprintf(&str, "%s", alpm_pkg_get_name(pkg));
@@ -700,7 +700,7 @@ void display_targets(const alpm_list_t *pkgs, int install)
const alpm_list_t *i;
off_t isize = 0, rsize = 0, dlsize = 0;
alpm_list_t *j, *lp, *header = NULL, *targets = NULL;
- pmdb_t *db_local = alpm_option_get_localdb(config->handle);
+ alpm_db_t *db_local = alpm_option_get_localdb(config->handle);
if(!pkgs) {
return;
@@ -882,7 +882,7 @@ void print_packages(const alpm_list_t *packages)
/* %r : repo */
if(strstr(temp,"%r")) {
const char *repo = "local";
- pmdb_t *db = alpm_pkg_get_db(pkg);
+ alpm_db_t *db = alpm_pkg_get_db(pkg);
if(db) {
repo = alpm_db_get_name(db);
}
@@ -950,7 +950,7 @@ void select_display(const alpm_list_t *pkglist)
for (i = pkglist; i; i = i->next) {
pmpkg_t *pkg = alpm_list_getdata(i);
- pmdb_t *db = alpm_pkg_get_db(pkg);
+ alpm_db_t *db = alpm_pkg_get_db(pkg);
if(!dbname)
dbname = alpm_db_get_name(db);
diff --git a/src/util/cleanupdelta.c b/src/util/cleanupdelta.c
index 80fcec3d..f56063db 100644
--- a/src/util/cleanupdelta.c
+++ b/src/util/cleanupdelta.c
@@ -69,7 +69,7 @@ static void checkpkgs(alpm_list_t *pkglist)
static void checkdbs(const char *dbpath, alpm_list_t *dbnames) {
char syncdbpath[PATH_MAX];
- pmdb_t *db = NULL;
+ alpm_db_t *db = NULL;
alpm_list_t *i;
for(i = dbnames; i; i = alpm_list_next(i)) {
diff --git a/src/util/testdb.c b/src/util/testdb.c
index ca007454..91dc9b23 100644
--- a/src/util/testdb.c
+++ b/src/util/testdb.c
@@ -129,7 +129,7 @@ static int checkconflicts(alpm_list_t *pkglist)
static int check_localdb(void) {
int ret = 0;
- pmdb_t *db = NULL;
+ alpm_db_t *db = NULL;
alpm_list_t *pkglist;
ret = check_localdb_files();
@@ -146,7 +146,7 @@ static int check_localdb(void) {
static int check_syncdbs(alpm_list_t *dbnames) {
int ret = 0;
- pmdb_t *db = NULL;
+ alpm_db_t *db = NULL;
alpm_list_t *i, *pkglist, *syncpkglist = NULL;
for(i = dbnames; i; i = alpm_list_next(i)) {