From 7ce674491bd854610855fe83482eda6b18273fa0 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 13:54:04 +1000 Subject: Rename pmpkgreason_t to alpm_pkgreason_t Signed-off-by: Allan McRae --- src/pacman/database.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/pacman/database.c b/src/pacman/database.c index 292fa54a..6a06ca33 100644 --- a/src/pacman/database.c +++ b/src/pacman/database.c @@ -42,7 +42,7 @@ int pacman_database(alpm_list_t *targets) alpm_list_t *i; pmdb_t *db_local; int retval = 0; - pmpkgreason_t reason; + alpm_pkgreason_t reason; if(targets == NULL) { pm_printf(PM_LOG_ERROR, _("no targets specified (use -h for help)\n")); -- cgit v1.2.3-24-g4f1b From 64c1cf792184661a1d3dd73329f129172e688f17 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:04:00 +1000 Subject: Rename pmhandle_t to alpm_handle_t Signed-off-by: Allan McRae --- src/pacman/conf.c | 2 +- src/pacman/conf.h | 2 +- src/util/cleanupdelta.c | 2 +- src/util/pactree.c | 2 +- src/util/testdb.c | 2 +- src/util/testpkg.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 076e854d..0e7429eb 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -421,7 +421,7 @@ static int setup_libalpm(void) { int ret = 0; enum _pmerrno_t err; - pmhandle_t *handle; + alpm_handle_t *handle; pm_printf(PM_LOG_DEBUG, "setup_libalpm called\n"); diff --git a/src/pacman/conf.h b/src/pacman/conf.h index 4c44bfdd..c0f35493 100644 --- a/src/pacman/conf.h +++ b/src/pacman/conf.h @@ -92,7 +92,7 @@ typedef struct __config_t { char *xfercommand; /* our connection to libalpm */ - pmhandle_t *handle; + alpm_handle_t *handle; } config_t; /* Operations */ diff --git a/src/util/cleanupdelta.c b/src/util/cleanupdelta.c index 5ee59dbb..80fcec3d 100644 --- a/src/util/cleanupdelta.c +++ b/src/util/cleanupdelta.c @@ -29,7 +29,7 @@ #define BASENAME "cleanupdelta" -pmhandle_t *handle = NULL; +alpm_handle_t *handle = NULL; static void cleanup(int signum) { if(handle && alpm_release(handle) == -1) { diff --git a/src/util/pactree.c b/src/util/pactree.c index 5beaa5a7..35ef9439 100644 --- a/src/util/pactree.c +++ b/src/util/pactree.c @@ -76,7 +76,7 @@ static struct color_choices no_color = { }; /* globals */ -pmhandle_t *handle = NULL; +alpm_handle_t *handle = NULL; alpm_list_t *walked = NULL; alpm_list_t *provisions = NULL; diff --git a/src/util/testdb.c b/src/util/testdb.c index af5007e2..ca007454 100644 --- a/src/util/testdb.c +++ b/src/util/testdb.c @@ -31,7 +31,7 @@ #define BASENAME "testdb" -pmhandle_t *handle = NULL; +alpm_handle_t *handle = NULL; static void cleanup(int signum) { if(handle && alpm_release(handle) == -1) { diff --git a/src/util/testpkg.c b/src/util/testpkg.c index d4d058d8..93d3fccd 100644 --- a/src/util/testpkg.c +++ b/src/util/testpkg.c @@ -40,7 +40,7 @@ static void output_cb(pmloglevel_t level, const char *fmt, va_list args) int main(int argc, char *argv[]) { int retval = 1; /* default = false */ - pmhandle_t *handle; + alpm_handle_t *handle; enum _pmerrno_t err; pmpkg_t *pkg = NULL; -- cgit v1.2.3-24-g4f1b From 939d5a9511b2dcbb07390ecfcd23528d8034709b Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:11:43 +1000 Subject: Rename pmdb_t to alpm_db_t Signed-off-by: Allan McRae --- src/pacman/conf.c | 4 ++-- src/pacman/database.c | 2 +- src/pacman/deptest.c | 2 +- src/pacman/query.c | 10 +++++----- src/pacman/remove.c | 2 +- src/pacman/sync.c | 40 ++++++++++++++++++++-------------------- src/pacman/util.c | 8 ++++---- src/util/cleanupdelta.c | 2 +- src/util/testdb.c | 4 ++-- 9 files changed, 37 insertions(+), 37 deletions(-) (limited to 'src') 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)) { -- cgit v1.2.3-24-g4f1b From 8a04bc25a14df93c0ca207ac83d43cdb867346a1 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 23:26:39 +1000 Subject: Rename pmpkg_t to alpm_pkg_t Signed-off-by: Allan McRae --- src/pacman/package.c | 8 ++++---- src/pacman/package.h | 8 ++++---- src/pacman/query.c | 22 +++++++++++----------- src/pacman/remove.c | 6 +++--- src/pacman/sync.c | 26 +++++++++++++------------- src/pacman/upgrade.c | 2 +- src/pacman/util.c | 20 ++++++++++---------- src/pacman/util.h | 4 ++-- src/util/cleanupdelta.c | 2 +- src/util/pactree.c | 12 ++++++------ src/util/testpkg.c | 2 +- 11 files changed, 56 insertions(+), 56 deletions(-) (limited to 'src') diff --git a/src/pacman/package.c b/src/pacman/package.c index 32156c53..22b9045e 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -45,7 +45,7 @@ * @param from the type of package we are dealing with * @param extra should we show extra information */ -void dump_pkg_full(pmpkg_t *pkg, enum pkg_from from, int extra) +void dump_pkg_full(alpm_pkg_t *pkg, enum pkg_from from, int extra) { const char *reason; time_t bdate, idate; @@ -192,7 +192,7 @@ static const char *get_backup_file_status(const char *root, /* Display list of backup files and their modification states */ -void dump_pkg_backups(pmpkg_t *pkg) +void dump_pkg_backups(alpm_pkg_t *pkg) { alpm_list_t *i; const char *root = alpm_option_get_root(config->handle); @@ -216,7 +216,7 @@ void dump_pkg_backups(pmpkg_t *pkg) /* List all files contained in a package */ -void dump_pkg_files(pmpkg_t *pkg, int quiet) +void dump_pkg_files(alpm_pkg_t *pkg, int quiet) { const char *pkgname, *root, *filestr; alpm_list_t *i, *pkgfiles; @@ -239,7 +239,7 @@ void dump_pkg_files(pmpkg_t *pkg, int quiet) /* Display the changelog of a package */ -void dump_pkg_changelog(pmpkg_t *pkg) +void dump_pkg_changelog(alpm_pkg_t *pkg) { void *fp = NULL; diff --git a/src/pacman/package.h b/src/pacman/package.h index 7a5e5853..6f71d20e 100644 --- a/src/pacman/package.h +++ b/src/pacman/package.h @@ -29,11 +29,11 @@ enum pkg_from { PKG_FROM_SYNCDB }; -void dump_pkg_full(pmpkg_t *pkg, enum pkg_from from, int extra); +void dump_pkg_full(alpm_pkg_t *pkg, enum pkg_from from, int extra); -void dump_pkg_backups(pmpkg_t *pkg); -void dump_pkg_files(pmpkg_t *pkg, int quiet); -void dump_pkg_changelog(pmpkg_t *pkg); +void dump_pkg_backups(alpm_pkg_t *pkg); +void dump_pkg_files(alpm_pkg_t *pkg, int quiet); +void dump_pkg_changelog(alpm_pkg_t *pkg); #endif /* _PM_PACKAGE_H */ diff --git a/src/pacman/query.c b/src/pacman/query.c index e0ec2c68..2602c114 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -95,7 +95,7 @@ static int search_path(char **filename, struct stat *bufptr) return -1; } -static void print_query_fileowner(const char *filename, pmpkg_t *info) +static void print_query_fileowner(const char *filename, alpm_pkg_t *info) { if(!config->quiet) { printf(_("%s is owned by %s %s\n"), filename, @@ -189,7 +189,7 @@ static int query_fileowner(alpm_list_t *targets) for(i = alpm_db_get_pkgcache(db_local); i && !found; i = alpm_list_next(i)) { alpm_list_t *j; - pmpkg_t *info = alpm_list_getdata(i); + alpm_pkg_t *info = alpm_list_getdata(i); for(j = alpm_pkg_get_files(info); j && !found; j = alpm_list_next(j)) { char *ppath, *pdname; @@ -256,7 +256,7 @@ static int query_search(alpm_list_t *targets) for(i = searchlist; i; i = alpm_list_next(i)) { alpm_list_t *grp; - pmpkg_t *pkg = alpm_list_getdata(i); + alpm_pkg_t *pkg = alpm_list_getdata(i); if(!config->quiet) { printf("local/%s %s", alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg)); @@ -307,7 +307,7 @@ static int query_group(alpm_list_t *targets) const alpm_list_t *p; for(p = grp->packages; p; p = alpm_list_next(p)) { - pmpkg_t *pkg = alpm_list_getdata(p); + alpm_pkg_t *pkg = alpm_list_getdata(p); printf("%s %s\n", grp->name, alpm_pkg_get_name(pkg)); } } @@ -335,7 +335,7 @@ static int query_group(alpm_list_t *targets) return ret; } -static int is_foreign(pmpkg_t *pkg) +static int is_foreign(alpm_pkg_t *pkg) { const char *pkgname = alpm_pkg_get_name(pkg); alpm_list_t *j; @@ -344,7 +344,7 @@ static int is_foreign(pmpkg_t *pkg) int match = 0; for(j = sync_dbs; j; j = alpm_list_next(j)) { alpm_db_t *db = alpm_list_getdata(j); - pmpkg_t *findpkg = alpm_db_get_pkg(db, pkgname); + alpm_pkg_t *findpkg = alpm_db_get_pkg(db, pkgname); if(findpkg) { match = 1; break; @@ -356,7 +356,7 @@ static int is_foreign(pmpkg_t *pkg) return 0; } -static int is_unrequired(pmpkg_t *pkg) +static int is_unrequired(alpm_pkg_t *pkg) { alpm_list_t *requiredby = alpm_pkg_compute_requiredby(pkg); if(requiredby == NULL) { @@ -366,7 +366,7 @@ static int is_unrequired(pmpkg_t *pkg) return 0; } -static int filter(pmpkg_t *pkg) +static int filter(alpm_pkg_t *pkg) { /* check if this package was explicitly installed */ if(config->op_q_explicit && @@ -396,7 +396,7 @@ static int filter(pmpkg_t *pkg) /* Loop through the packages. For each package, * loop through files to check if they exist. */ -static int check(pmpkg_t *pkg) +static int check(alpm_pkg_t *pkg) { alpm_list_t *i; const char *root; @@ -446,7 +446,7 @@ static int check(pmpkg_t *pkg) return (errors != 0 ? 1 : 0); } -static int display(pmpkg_t *pkg) +static int display(alpm_pkg_t *pkg) { int ret = 0; @@ -482,7 +482,7 @@ int pacman_query(alpm_list_t *targets) int ret = 0; int match = 0; alpm_list_t *i; - pmpkg_t *pkg = NULL; + alpm_pkg_t *pkg = NULL; 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 f30f5068..c2490e3b 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -33,7 +33,7 @@ static int remove_target(const char *target) { - pmpkg_t *info; + alpm_pkg_t *info; alpm_db_t *db_local = alpm_option_get_localdb(config->handle); alpm_list_t *p; @@ -53,7 +53,7 @@ static int remove_target(const char *target) return -1; } for(p = grp->packages; p; p = alpm_list_next(p)) { - pmpkg_t *pkg = alpm_list_getdata(p); + alpm_pkg_t *pkg = alpm_list_getdata(p); if(alpm_remove_pkg(config->handle, pkg) == -1) { pm_fprintf(stderr, PM_LOG_ERROR, "'%s': %s\n", target, alpm_strerror(alpm_errno(config->handle))); @@ -131,7 +131,7 @@ int pacman_remove(alpm_list_t *targets) /* Search for holdpkg in target list */ int holdpkg = 0; for(i = alpm_trans_get_remove(config->handle); i; i = alpm_list_next(i)) { - pmpkg_t *pkg = alpm_list_getdata(i); + alpm_pkg_t *pkg = alpm_list_getdata(i); if(alpm_list_find_str(config->holdpkg, alpm_pkg_get_name(pkg))) { pm_printf(PM_LOG_WARNING, _("%s is designated as a HoldPkg.\n"), alpm_pkg_get_name(pkg)); diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 9dde7605..ae28ac97 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -196,7 +196,7 @@ static int sync_cleancache(int level) char path[PATH_MAX]; size_t pathlen; int delete = 1; - pmpkg_t *localpkg = NULL, *pkg = NULL; + alpm_pkg_t *localpkg = NULL, *pkg = NULL; const char *local_name, *local_version; if(strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) { @@ -308,11 +308,11 @@ static int sync_synctree(int level, alpm_list_t *syncs) return (success > 0); } -static void print_installed(alpm_db_t *db_local, pmpkg_t *pkg) +static void print_installed(alpm_db_t *db_local, alpm_pkg_t *pkg) { const char *pkgname = alpm_pkg_get_name(pkg); const char *pkgver = alpm_pkg_get_version(pkg); - pmpkg_t *lpkg = alpm_db_get_pkg(db_local, pkgname); + alpm_pkg_t *lpkg = alpm_db_get_pkg(db_local, pkgname); if(lpkg) { const char *lpkgver = alpm_pkg_get_version(lpkg); if(strcmp(lpkgver,pkgver) == 0) { @@ -348,7 +348,7 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets) } for(j = ret; j; j = alpm_list_next(j)) { alpm_list_t *grp; - pmpkg_t *pkg = alpm_list_getdata(j); + alpm_pkg_t *pkg = alpm_list_getdata(j); if(!config->quiet) { printf("%s/%s %s", alpm_db_get_name(db), alpm_pkg_get_name(pkg), @@ -471,7 +471,7 @@ static int sync_info(alpm_list_t *syncs, alpm_list_t *targets) } for(k = alpm_db_get_pkgcache(db); k; k = alpm_list_next(k)) { - pmpkg_t *pkg = alpm_list_getdata(k); + alpm_pkg_t *pkg = alpm_list_getdata(k); if(strcmp(alpm_pkg_get_name(pkg), pkgstr) == 0) { dump_pkg_full(pkg, PKG_FROM_SYNCDB, config->op_s_info > 1); @@ -492,7 +492,7 @@ static int sync_info(alpm_list_t *syncs, alpm_list_t *targets) 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); + alpm_pkg_t *pkg = alpm_list_getdata(k); if(strcmp(alpm_pkg_get_name(pkg), pkgstr) == 0) { dump_pkg_full(pkg, PKG_FROM_SYNCDB, config->op_s_info > 1); @@ -513,7 +513,7 @@ static int sync_info(alpm_list_t *syncs, alpm_list_t *targets) 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); + alpm_pkg_t *pkg = alpm_list_getdata(j); dump_pkg_full(pkg, PKG_FROM_SYNCDB, config->op_s_info > 1); } } @@ -558,7 +558,7 @@ static int sync_list(alpm_list_t *syncs, alpm_list_t *targets) 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); + alpm_pkg_t *pkg = alpm_list_getdata(j); if(!config->quiet) { printf("%s %s %s", alpm_db_get_name(db), alpm_pkg_get_name(pkg), @@ -585,7 +585,7 @@ static alpm_list_t *syncfirst(void) { for(i = config->syncfirst; i; i = alpm_list_next(i)) { char *pkgname = alpm_list_getdata(i); - pmpkg_t *pkg = alpm_db_get_pkg(db_local, pkgname); + alpm_pkg_t *pkg = alpm_db_get_pkg(db_local, pkgname); if(pkg == NULL) { continue; } @@ -610,7 +610,7 @@ static alpm_db_t *get_db(const char *dbname) return NULL; } -static int process_pkg(pmpkg_t *pkg) +static int process_pkg(alpm_pkg_t *pkg) { int ret = alpm_add_pkg(config->handle, pkg); @@ -653,7 +653,7 @@ static int process_group(alpm_list_t *dbs, char *group) for(i = pkgs; i; i = alpm_list_next(i)) { if(array[n++] == 0) continue; - pmpkg_t *pkg = alpm_list_getdata(i); + alpm_pkg_t *pkg = alpm_list_getdata(i); if(process_pkg(pkg) == 1) { ret = 1; @@ -663,7 +663,7 @@ static int process_group(alpm_list_t *dbs, char *group) } } else { for(i = pkgs; i; i = alpm_list_next(i)) { - pmpkg_t *pkg = alpm_list_getdata(i); + alpm_pkg_t *pkg = alpm_list_getdata(i); if(process_pkg(pkg) == 1) { ret = 1; @@ -678,7 +678,7 @@ cleanup: static int process_targname(alpm_list_t *dblist, char *targname) { - pmpkg_t *pkg = alpm_find_dbs_satisfier(config->handle, dblist, targname); + alpm_pkg_t *pkg = alpm_find_dbs_satisfier(config->handle, dblist, targname); /* #FS#23342 - skip ignored packages when user says no */ if(alpm_errno(config->handle) == PM_ERR_PKG_IGNORED) { diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c index c1f72f6d..24420ef0 100644 --- a/src/pacman/upgrade.c +++ b/src/pacman/upgrade.c @@ -74,7 +74,7 @@ int pacman_upgrade(alpm_list_t *targets) /* add targets to the created transaction */ for(i = targets; i; i = alpm_list_next(i)) { char *targ = alpm_list_getdata(i); - pmpkg_t *pkg; + alpm_pkg_t *pkg; if(alpm_pkg_load(config->handle, targ, 1, check_sig, &pkg) != 0) { pm_fprintf(stderr, PM_LOG_ERROR, "'%s': %s\n", diff --git a/src/pacman/util.c b/src/pacman/util.c index cdf8b11a..1e6d1e18 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -660,7 +660,7 @@ static alpm_list_t *create_verbose_header(int install) } /* returns package info as list of strings */ -static alpm_list_t *create_verbose_row(pmpkg_t *pkg, int install) +static alpm_list_t *create_verbose_row(alpm_pkg_t *pkg, int install) { char *str; double size; @@ -674,7 +674,7 @@ static alpm_list_t *create_verbose_row(pmpkg_t *pkg, int install) /* old and new versions */ if(install) { - pmpkg_t *oldpkg = alpm_db_get_pkg(ldb, alpm_pkg_get_name(pkg)); + alpm_pkg_t *oldpkg = alpm_db_get_pkg(ldb, alpm_pkg_get_name(pkg)); pm_asprintf(&str, "%s", oldpkg != NULL ? alpm_pkg_get_version(oldpkg) : ""); ret = alpm_list_add(ret, str); @@ -708,10 +708,10 @@ void display_targets(const alpm_list_t *pkgs, int install) /* gather pkg infos */ for(i = pkgs; i; i = alpm_list_next(i)) { - pmpkg_t *pkg = alpm_list_getdata(i); + alpm_pkg_t *pkg = alpm_list_getdata(i); if(install) { - pmpkg_t *lpkg = alpm_db_get_pkg(db_local, alpm_pkg_get_name(pkg)); + alpm_pkg_t *lpkg = alpm_db_get_pkg(db_local, alpm_pkg_get_name(pkg)); dlsize += alpm_pkg_download_size(pkg); if(lpkg) { /* add up size of all removed packages */ @@ -779,7 +779,7 @@ out: free(str); } -static off_t pkg_get_size(pmpkg_t *pkg) +static off_t pkg_get_size(alpm_pkg_t *pkg) { switch(config->op) { case PM_OP_SYNC: @@ -791,7 +791,7 @@ static off_t pkg_get_size(pmpkg_t *pkg) } } -static char *pkg_get_location(pmpkg_t *pkg) +static char *pkg_get_location(alpm_pkg_t *pkg) { alpm_list_t *servers; char *string = NULL; @@ -856,7 +856,7 @@ void print_packages(const alpm_list_t *packages) config->print_format = strdup("%l"); } for(i = packages; i; i = alpm_list_next(i)) { - pmpkg_t *pkg = alpm_list_getdata(i); + alpm_pkg_t *pkg = alpm_list_getdata(i); char *string = strdup(config->print_format); char *temp = string; /* %n : pkgname */ @@ -910,7 +910,7 @@ int str_cmp(const void *s1, const void *s2) return strcmp(s1, s2); } -void display_new_optdepends(pmpkg_t *oldpkg, pmpkg_t *newpkg) +void display_new_optdepends(alpm_pkg_t *oldpkg, alpm_pkg_t *newpkg) { alpm_list_t *old = alpm_pkg_get_optdepends(oldpkg); alpm_list_t *new = alpm_pkg_get_optdepends(newpkg); @@ -922,7 +922,7 @@ void display_new_optdepends(pmpkg_t *oldpkg, pmpkg_t *newpkg) alpm_list_free(optdeps); } -void display_optdepends(pmpkg_t *pkg) +void display_optdepends(alpm_pkg_t *pkg) { alpm_list_t *optdeps = alpm_pkg_get_optdepends(pkg); if(optdeps) { @@ -949,7 +949,7 @@ void select_display(const alpm_list_t *pkglist) const char *dbname = NULL; for (i = pkglist; i; i = i->next) { - pmpkg_t *pkg = alpm_list_getdata(i); + alpm_pkg_t *pkg = alpm_list_getdata(i); alpm_db_t *db = alpm_pkg_get_db(pkg); if(!dbname) diff --git a/src/pacman/util.h b/src/pacman/util.h index d8ae7d80..89ab903a 100644 --- a/src/pacman/util.h +++ b/src/pacman/util.h @@ -58,8 +58,8 @@ void list_display(const char *title, const alpm_list_t *list); void list_display_linebreak(const char *title, const alpm_list_t *list); void display_targets(const alpm_list_t *pkgs, int install); int str_cmp(const void *s1, const void *s2); -void display_new_optdepends(pmpkg_t *oldpkg, pmpkg_t *newpkg); -void display_optdepends(pmpkg_t *pkg); +void display_new_optdepends(alpm_pkg_t *oldpkg, alpm_pkg_t *newpkg); +void display_optdepends(alpm_pkg_t *pkg); void print_packages(const alpm_list_t *packages); void select_display(const alpm_list_t *pkglist); int select_question(int count); diff --git a/src/util/cleanupdelta.c b/src/util/cleanupdelta.c index f56063db..dcd849bb 100644 --- a/src/util/cleanupdelta.c +++ b/src/util/cleanupdelta.c @@ -57,7 +57,7 @@ static void checkpkgs(alpm_list_t *pkglist) { alpm_list_t *i, *j; for(i = pkglist; i; i = alpm_list_next(i)) { - pmpkg_t *pkg = alpm_list_getdata(i); + alpm_pkg_t *pkg = alpm_list_getdata(i); alpm_list_t *unused = alpm_pkg_unused_deltas(pkg); for(j = unused; j; j = alpm_list_next(j)) { char *delta = alpm_list_getdata(j); diff --git a/src/util/pactree.c b/src/util/pactree.c index 35ef9439..f677a4de 100644 --- a/src/util/pactree.c +++ b/src/util/pactree.c @@ -316,9 +316,9 @@ static void print_end(void) } } -static pmpkg_t *get_pkg_from_dbs(alpm_list_t *dbs, const char *needle) { +static alpm_pkg_t *get_pkg_from_dbs(alpm_list_t *dbs, const char *needle) { alpm_list_t *i; - pmpkg_t *ret; + alpm_pkg_t *ret; for(i = dbs; i; i = alpm_list_next(i)) { ret = alpm_db_get_pkg(alpm_list_getdata(i), needle); @@ -332,7 +332,7 @@ static pmpkg_t *get_pkg_from_dbs(alpm_list_t *dbs, const char *needle) { /** * walk dependencies in reverse, showing packages which require the target */ -static void walk_reverse_deps(alpm_list_t *dblist, pmpkg_t *pkg, int depth) +static void walk_reverse_deps(alpm_list_t *dblist, alpm_pkg_t *pkg, int depth) { alpm_list_t *required_by, *i; @@ -364,7 +364,7 @@ static void walk_reverse_deps(alpm_list_t *dblist, pmpkg_t *pkg, int depth) /** * walk dependencies, showing dependencies of the target */ -static void walk_deps(alpm_list_t *dblist, pmpkg_t *pkg, int depth) +static void walk_deps(alpm_list_t *dblist, alpm_pkg_t *pkg, int depth) { alpm_list_t *i; @@ -376,7 +376,7 @@ static void walk_deps(alpm_list_t *dblist, pmpkg_t *pkg, int depth) for(i = alpm_pkg_get_depends(pkg); i; i = alpm_list_next(i)) { pmdepend_t *depend = alpm_list_getdata(i); - pmpkg_t *provider = alpm_find_dbs_satisfier(handle, dblist, depend->name); + alpm_pkg_t *provider = alpm_find_dbs_satisfier(handle, dblist, depend->name); if(provider) { const char *provname = alpm_pkg_get_name(provider); @@ -403,7 +403,7 @@ int main(int argc, char *argv[]) int freelist = 0, ret = 0; enum _pmerrno_t err; const char *target_name; - pmpkg_t *pkg; + alpm_pkg_t *pkg; alpm_list_t *dblist = NULL; if(parse_options(argc, argv) != 0) { diff --git a/src/util/testpkg.c b/src/util/testpkg.c index 93d3fccd..972b2f47 100644 --- a/src/util/testpkg.c +++ b/src/util/testpkg.c @@ -42,7 +42,7 @@ int main(int argc, char *argv[]) int retval = 1; /* default = false */ alpm_handle_t *handle; enum _pmerrno_t err; - pmpkg_t *pkg = NULL; + alpm_pkg_t *pkg = NULL; if(argc != 2) { fprintf(stderr, "usage: %s \n", BASENAME); -- cgit v1.2.3-24-g4f1b From 9540dfc4d9cc70266a425cc334f78d7805b2340b Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:29:55 +1000 Subject: Rename pmdepend_t to alpm_depend_t Signed-off-by: Allan McRae --- src/pacman/callback.c | 2 +- src/pacman/package.c | 2 +- src/util/pactree.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/pacman/callback.c b/src/pacman/callback.c index ffca8bec..0cc462d6 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -312,7 +312,7 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2, { alpm_list_t *providers = (alpm_list_t *)data1; int count = alpm_list_count(providers); - char *depstring = alpm_dep_compute_string((pmdepend_t *)data2); + char *depstring = alpm_dep_compute_string((alpm_depend_t *)data2); printf(_(":: There are %d providers available for %s:\n"), count, depstring); free(depstring); diff --git a/src/pacman/package.c b/src/pacman/package.c index 22b9045e..49d80ef0 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -83,7 +83,7 @@ void dump_pkg_full(alpm_pkg_t *pkg, enum pkg_from from, int extra) /* turn depends list into a text list */ for(i = alpm_pkg_get_depends(pkg); i; i = alpm_list_next(i)) { - pmdepend_t *dep = (pmdepend_t *)alpm_list_getdata(i); + alpm_depend_t *dep = (alpm_depend_t *)alpm_list_getdata(i); depstrings = alpm_list_add(depstrings, alpm_dep_compute_string(dep)); } diff --git a/src/util/pactree.c b/src/util/pactree.c index f677a4de..bdc1cb2f 100644 --- a/src/util/pactree.c +++ b/src/util/pactree.c @@ -375,7 +375,7 @@ static void walk_deps(alpm_list_t *dblist, alpm_pkg_t *pkg, int depth) walked = alpm_list_add(walked, (void *)alpm_pkg_get_name(pkg)); for(i = alpm_pkg_get_depends(pkg); i; i = alpm_list_next(i)) { - pmdepend_t *depend = alpm_list_getdata(i); + alpm_depend_t *depend = alpm_list_getdata(i); alpm_pkg_t *provider = alpm_find_dbs_satisfier(handle, dblist, depend->name); if(provider) { -- cgit v1.2.3-24-g4f1b From 6d876f9b6be055d54e50d42a34c267aad64c0b21 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:32:09 +1000 Subject: Rename pmdepmissing_t to alpm_depmissing_t Signed-off-by: Allan McRae --- src/pacman/remove.c | 2 +- src/pacman/sync.c | 2 +- src/pacman/upgrade.c | 2 +- src/util/testdb.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/pacman/remove.c b/src/pacman/remove.c index c2490e3b..75388f1a 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -114,7 +114,7 @@ int pacman_remove(alpm_list_t *targets) break; case PM_ERR_UNSATISFIED_DEPS: for(i = data; i; i = alpm_list_next(i)) { - pmdepmissing_t *miss = alpm_list_getdata(i); + alpm_depmissing_t *miss = alpm_list_getdata(i); char *depstring = alpm_dep_compute_string(miss->depend); printf(_(":: %s: requires %s\n"), miss->target, depstring); free(depstring); diff --git a/src/pacman/sync.c b/src/pacman/sync.c index ae28ac97..659396cd 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -775,7 +775,7 @@ static int sync_trans(alpm_list_t *targets) break; case PM_ERR_UNSATISFIED_DEPS: for(i = data; i; i = alpm_list_next(i)) { - pmdepmissing_t *miss = alpm_list_getdata(i); + alpm_depmissing_t *miss = alpm_list_getdata(i); char *depstring = alpm_dep_compute_string(miss->depend); printf(_(":: %s: requires %s\n"), miss->target, depstring); free(depstring); diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c index 24420ef0..67860277 100644 --- a/src/pacman/upgrade.c +++ b/src/pacman/upgrade.c @@ -106,7 +106,7 @@ int pacman_upgrade(alpm_list_t *targets) break; case PM_ERR_UNSATISFIED_DEPS: for(i = data; i; i = alpm_list_next(i)) { - pmdepmissing_t *miss = alpm_list_getdata(i); + alpm_depmissing_t *miss = alpm_list_getdata(i); char *depstring = alpm_dep_compute_string(miss->depend); /* TODO indicate if the error was a virtual package or not: diff --git a/src/util/testdb.c b/src/util/testdb.c index 91dc9b23..fff43a22 100644 --- a/src/util/testdb.c +++ b/src/util/testdb.c @@ -100,7 +100,7 @@ static int checkdeps(alpm_list_t *pkglist) /* check dependencies */ data = alpm_checkdeps(handle, pkglist, NULL, pkglist, 0); for(i = data; i; i = alpm_list_next(i)) { - pmdepmissing_t *miss = alpm_list_getdata(i); + alpm_depmissing_t *miss = alpm_list_getdata(i); char *depstring = alpm_dep_compute_string(miss->depend); printf("missing dependency for %s : %s\n", miss->target, depstring); -- cgit v1.2.3-24-g4f1b From 220842b37ba484a452f5e4d8071d91d3f2b6c2d4 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:33:55 +1000 Subject: Rename pmconflict_t to alpm_conflict_t Signed-off-by: Allan McRae --- src/pacman/sync.c | 2 +- src/pacman/upgrade.c | 2 +- src/util/testdb.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 659396cd..f0d7dba8 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -783,7 +783,7 @@ static int sync_trans(alpm_list_t *targets) break; case PM_ERR_CONFLICTING_DEPS: for(i = data; i; i = alpm_list_next(i)) { - pmconflict_t *conflict = alpm_list_getdata(i); + alpm_conflict_t *conflict = alpm_list_getdata(i); /* only print reason if it contains new information */ if(strcmp(conflict->package1, conflict->reason) == 0 || strcmp(conflict->package2, conflict->reason) == 0) { diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c index 67860277..1fa538da 100644 --- a/src/pacman/upgrade.c +++ b/src/pacman/upgrade.c @@ -118,7 +118,7 @@ int pacman_upgrade(alpm_list_t *targets) break; case PM_ERR_CONFLICTING_DEPS: for(i = data; i; i = alpm_list_next(i)) { - pmconflict_t *conflict = alpm_list_getdata(i); + alpm_conflict_t *conflict = alpm_list_getdata(i); if(strcmp(conflict->package1, conflict->reason) == 0 || strcmp(conflict->package2, conflict->reason) == 0) { printf(_(":: %s and %s are in conflict\n"), diff --git a/src/util/testdb.c b/src/util/testdb.c index fff43a22..38067911 100644 --- a/src/util/testdb.c +++ b/src/util/testdb.c @@ -118,7 +118,7 @@ static int checkconflicts(alpm_list_t *pkglist) /* check conflicts */ data = alpm_checkconflicts(handle, pkglist); for(i = data; i; i = i->next) { - pmconflict_t *conflict = alpm_list_getdata(i); + alpm_conflict_t *conflict = alpm_list_getdata(i); printf("%s conflicts with %s\n", conflict->package1, conflict->package2); ret++; -- cgit v1.2.3-24-g4f1b From 37b6cceed41bc22d0d9fb1fe2f274067ddd2b2cc Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:35:17 +1000 Subject: Rename pmfileconflict_t to alpm_fileconflict_t Signed-off-by: Allan McRae --- src/pacman/sync.c | 2 +- src/pacman/upgrade.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pacman/sync.c b/src/pacman/sync.c index f0d7dba8..418cda1d 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -836,7 +836,7 @@ static int sync_trans(alpm_list_t *targets) switch(err) { case PM_ERR_FILE_CONFLICTS: for(i = data; i; i = alpm_list_next(i)) { - pmfileconflict_t *conflict = alpm_list_getdata(i); + alpm_fileconflict_t *conflict = alpm_list_getdata(i); switch(conflict->type) { case PM_FILECONFLICT_TARGET: printf(_("%s exists in both '%s' and '%s'\n"), diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c index 1fa538da..7f6e0986 100644 --- a/src/pacman/upgrade.c +++ b/src/pacman/upgrade.c @@ -168,7 +168,7 @@ int pacman_upgrade(alpm_list_t *targets) switch(err) { case PM_ERR_FILE_CONFLICTS: for(i = data; i; i = alpm_list_next(i)) { - pmfileconflict_t *conflict = alpm_list_getdata(i); + alpm_fileconflict_t *conflict = alpm_list_getdata(i); switch(conflict->type) { case PM_FILECONFLICT_TARGET: printf(_("%s exists in both '%s' and '%s'\n"), -- cgit v1.2.3-24-g4f1b From 1fdbe7902219c5ed3e56b921acae4f3a58b9e76e Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:37:16 +1000 Subject: Rename pmgrp_t to alpm_group_t Signed-off-by: Allan McRae --- src/pacman/query.c | 4 ++-- src/pacman/remove.c | 2 +- src/pacman/sync.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/pacman/query.c b/src/pacman/query.c index 2602c114..0a420c78 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -303,7 +303,7 @@ static int query_group(alpm_list_t *targets) if(targets == NULL) { for(j = alpm_db_get_grpcache(db_local); j; j = alpm_list_next(j)) { - pmgrp_t *grp = alpm_list_getdata(j); + alpm_group_t *grp = alpm_list_getdata(j); const alpm_list_t *p; for(p = grp->packages; p; p = alpm_list_next(p)) { @@ -313,7 +313,7 @@ static int query_group(alpm_list_t *targets) } } else { for(i = targets; i; i = alpm_list_next(i)) { - pmgrp_t *grp; + alpm_group_t *grp; grpname = alpm_list_getdata(i); grp = alpm_db_readgrp(db_local, grpname); if(grp) { diff --git a/src/pacman/remove.c b/src/pacman/remove.c index 75388f1a..eab8bdfc 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -47,7 +47,7 @@ static int remove_target(const char *target) } /* fallback to group */ - pmgrp_t *grp = alpm_db_readgrp(db_local, target); + alpm_group_t *grp = alpm_db_readgrp(db_local, target); if(grp == NULL) { pm_fprintf(stderr, PM_LOG_ERROR, "'%s': target not found\n", target); return -1; diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 418cda1d..5b06a806 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -398,7 +398,7 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets) const char *grpname = alpm_list_getdata(i); for(j = syncs; j; j = alpm_list_next(j)) { alpm_db_t *db = alpm_list_getdata(j); - pmgrp_t *grp = alpm_db_readgrp(db, grpname); + alpm_group_t *grp = alpm_db_readgrp(db, grpname); if(grp) { /* get names of packages in group */ @@ -418,7 +418,7 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets) 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); + alpm_group_t *grp = alpm_list_getdata(j); if(level > 1) { for(k = grp->packages; k; k = alpm_list_next(k)) { -- cgit v1.2.3-24-g4f1b From cd1e39ba62ea564c1c29a918aa1a4d6aac9a351e Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:39:43 +1000 Subject: Rename pmbackup_t to alpm_backup_t Signed-off-by: Allan McRae --- src/pacman/package.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pacman/package.c b/src/pacman/package.c index 49d80ef0..6b480873 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -151,7 +151,7 @@ void dump_pkg_full(alpm_pkg_t *pkg, enum pkg_from from, int extra) } static const char *get_backup_file_status(const char *root, - const pmbackup_t *backup) + const alpm_backup_t *backup) { char path[PATH_MAX]; const char *ret; @@ -200,7 +200,7 @@ void dump_pkg_backups(alpm_pkg_t *pkg) if(alpm_pkg_get_backup(pkg)) { /* package has backup files, so print them */ for(i = alpm_pkg_get_backup(pkg); i; i = alpm_list_next(i)) { - const pmbackup_t *backup = alpm_list_getdata(i); + const alpm_backup_t *backup = alpm_list_getdata(i); const char *value; if(!backup->hash) { continue; -- cgit v1.2.3-24-g4f1b From 0aef91bc4fc5e872afe7da1692bf97c027eecf37 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:41:07 +1000 Subject: Rename pmloglevel_t to alpm_loglevel_t Signed-off-by: Allan McRae --- src/pacman/callback.c | 2 +- src/pacman/callback.h | 2 +- src/pacman/util.c | 8 ++++---- src/pacman/util.h | 8 ++++---- src/util/cleanupdelta.c | 2 +- src/util/testdb.c | 2 +- src/util/testpkg.c | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 0cc462d6..6b5546a6 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -655,7 +655,7 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total) } /* Callback to handle notifications from the library */ -void cb_log(pmloglevel_t level, const char *fmt, va_list args) +void cb_log(alpm_loglevel_t level, const char *fmt, va_list args) { if(!fmt || strlen(fmt) == 0) { return; diff --git a/src/pacman/callback.h b/src/pacman/callback.h index 1109a3b2..5e8acd7a 100644 --- a/src/pacman/callback.h +++ b/src/pacman/callback.h @@ -41,7 +41,7 @@ void cb_dl_total(off_t total); void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total); /* callback to handle messages/notifications from pacman library */ -void cb_log(pmloglevel_t level, const char *fmt, va_list args); +void cb_log(alpm_loglevel_t level, const char *fmt, va_list args); #endif /* _PM_CALLBACK_H */ diff --git a/src/pacman/util.c b/src/pacman/util.c index 1e6d1e18..5dceead3 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -1194,7 +1194,7 @@ int noyes(char *fmt, ...) return ret; } -int pm_printf(pmloglevel_t level, const char *format, ...) +int pm_printf(alpm_loglevel_t level, const char *format, ...) { int ret; va_list args; @@ -1207,7 +1207,7 @@ int pm_printf(pmloglevel_t level, const char *format, ...) return ret; } -int pm_fprintf(FILE *stream, pmloglevel_t level, const char *format, ...) +int pm_fprintf(FILE *stream, alpm_loglevel_t level, const char *format, ...) { int ret; va_list args; @@ -1236,7 +1236,7 @@ int pm_asprintf(char **string, const char *format, ...) return ret; } -int pm_vasprintf(char **string, pmloglevel_t level, const char *format, va_list args) +int pm_vasprintf(char **string, alpm_loglevel_t level, const char *format, va_list args) { int ret = 0; char *msg = NULL; @@ -1272,7 +1272,7 @@ int pm_vasprintf(char **string, pmloglevel_t level, const char *format, va_list return ret; } -int pm_vfprintf(FILE *stream, pmloglevel_t level, const char *format, va_list args) +int pm_vfprintf(FILE *stream, alpm_loglevel_t level, const char *format, va_list args) { int ret = 0; diff --git a/src/pacman/util.h b/src/pacman/util.h index 89ab903a..25e2f302 100644 --- a/src/pacman/util.h +++ b/src/pacman/util.h @@ -66,11 +66,11 @@ int select_question(int count); int multiselect_question(char *array, int count); int yesno(char *fmt, ...); int noyes(char *fmt, ...); -int pm_printf(pmloglevel_t level, const char *format, ...) __attribute__((format(printf,2,3))); -int pm_fprintf(FILE *stream, pmloglevel_t level, const char *format, ...) __attribute__((format(printf,3,4))); +int pm_printf(alpm_loglevel_t level, const char *format, ...) __attribute__((format(printf,2,3))); +int pm_fprintf(FILE *stream, alpm_loglevel_t level, const char *format, ...) __attribute__((format(printf,3,4))); int pm_asprintf(char **string, const char *format, ...); -int pm_vfprintf(FILE *stream, pmloglevel_t level, const char *format, va_list args) __attribute__((format(printf,3,0))); -int pm_vasprintf(char **string, pmloglevel_t level, const char *format, va_list args) __attribute__((format(printf,3,0))); +int pm_vfprintf(FILE *stream, alpm_loglevel_t level, const char *format, va_list args) __attribute__((format(printf,3,0))); +int pm_vasprintf(char **string, alpm_loglevel_t level, const char *format, va_list args) __attribute__((format(printf,3,0))); #ifndef HAVE_STRNDUP char *strndup(const char *s, size_t n); diff --git a/src/util/cleanupdelta.c b/src/util/cleanupdelta.c index dcd849bb..43897730 100644 --- a/src/util/cleanupdelta.c +++ b/src/util/cleanupdelta.c @@ -39,7 +39,7 @@ static void cleanup(int signum) { exit(signum); } -static void output_cb(pmloglevel_t level, const char *fmt, va_list args) +static void output_cb(alpm_loglevel_t level, const char *fmt, va_list args) { if(strlen(fmt)) { switch(level) { diff --git a/src/util/testdb.c b/src/util/testdb.c index 38067911..c887f6d5 100644 --- a/src/util/testdb.c +++ b/src/util/testdb.c @@ -41,7 +41,7 @@ static void cleanup(int signum) { exit(signum); } -static void output_cb(pmloglevel_t level, const char *fmt, va_list args) +static void output_cb(alpm_loglevel_t level, const char *fmt, va_list args) { if(strlen(fmt)) { switch(level) { diff --git a/src/util/testpkg.c b/src/util/testpkg.c index 972b2f47..70a395e8 100644 --- a/src/util/testpkg.c +++ b/src/util/testpkg.c @@ -24,7 +24,7 @@ #define BASENAME "testpkg" -static void output_cb(pmloglevel_t level, const char *fmt, va_list args) +static void output_cb(alpm_loglevel_t level, const char *fmt, va_list args) { if(fmt[0] == '\0') { return; -- cgit v1.2.3-24-g4f1b From 590a8fcb1e72707d83d04f639385de0d7f2a60c1 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:42:24 +1000 Subject: Rename pmtransflag_t to alpm_transflag_t Signed-off-by: Allan McRae --- src/pacman/conf.h | 2 +- src/pacman/util.c | 2 +- src/pacman/util.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/pacman/conf.h b/src/pacman/conf.h index c0f35493..64b911ab 100644 --- a/src/pacman/conf.h +++ b/src/pacman/conf.h @@ -70,7 +70,7 @@ typedef struct __config_t { unsigned short group; unsigned short noask; unsigned int ask; - pmtransflag_t flags; + alpm_transflag_t flags; pgp_verify_t sigverify; /* conf file options */ diff --git a/src/pacman/util.c b/src/pacman/util.c index 5dceead3..a661b2e9 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -49,7 +49,7 @@ #include "callback.h" -int trans_init(pmtransflag_t flags) +int trans_init(alpm_transflag_t flags) { int ret; if(config->print) { diff --git a/src/pacman/util.h b/src/pacman/util.h index 25e2f302..5d86dfda 100644 --- a/src/pacman/util.h +++ b/src/pacman/util.h @@ -39,7 +39,7 @@ /* update speed for the fill_progress based functions */ #define UPDATE_SPEED_SEC 0.2f -int trans_init(pmtransflag_t flags); +int trans_init(alpm_transflag_t flags); int trans_release(void); int needs_root(void); int getcols(void); -- cgit v1.2.3-24-g4f1b From 011ef6be0e68dcf148a255c31a9a6efb7429c2f9 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:43:48 +1000 Subject: Rename pmtransevt_t to alpm_transevt_t Signed-off-by: Allan McRae --- src/pacman/callback.c | 2 +- src/pacman/callback.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 6b5546a6..a53b3fdd 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -153,7 +153,7 @@ static void fill_progress(const int bar_percent, const int disp_percent, /* callback to handle messages/notifications from libalpm transactions */ -void cb_trans_evt(pmtransevt_t event, void *data1, void *data2) +void cb_trans_evt(alpm_transevt_t event, void *data1, void *data2) { switch(event) { case PM_TRANS_EVT_CHECKDEPS_START: diff --git a/src/pacman/callback.h b/src/pacman/callback.h index 5e8acd7a..ae78eb44 100644 --- a/src/pacman/callback.h +++ b/src/pacman/callback.h @@ -25,7 +25,7 @@ #include /* callback to handle messages/notifications from libalpm transactions */ -void cb_trans_evt(pmtransevt_t event, void *data1, void *data2); +void cb_trans_evt(alpm_transevt_t event, void *data1, void *data2); /* callback to handle questions from libalpm transactions (yes/no) */ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2, -- cgit v1.2.3-24-g4f1b From 565e167356c1ec56803454b2b4c617f21296fb67 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:46:58 +1000 Subject: Rename pmtransconv_t to alpm_transconv_t Signed-off-by: Allan McRae --- src/pacman/callback.c | 2 +- src/pacman/callback.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pacman/callback.c b/src/pacman/callback.c index a53b3fdd..c59c566f 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -251,7 +251,7 @@ void cb_trans_evt(alpm_transevt_t event, void *data1, void *data2) /* callback to handle questions from libalpm transactions (yes/no) */ /* TODO this is one of the worst ever functions written. void *data ? wtf */ -void cb_trans_conv(pmtransconv_t event, void *data1, void *data2, +void cb_trans_conv(alpm_transconv_t event, void *data1, void *data2, void *data3, int *response) { switch(event) { diff --git a/src/pacman/callback.h b/src/pacman/callback.h index ae78eb44..388af39d 100644 --- a/src/pacman/callback.h +++ b/src/pacman/callback.h @@ -28,7 +28,7 @@ void cb_trans_evt(alpm_transevt_t event, void *data1, void *data2); /* callback to handle questions from libalpm transactions (yes/no) */ -void cb_trans_conv(pmtransconv_t event, void *data1, void *data2, +void cb_trans_conv(alpm_transconv_t event, void *data1, void *data2, void *data3, int *response); /* callback to handle display of transaction progress */ -- cgit v1.2.3-24-g4f1b From 1059df7486054c621423436b801681775a2596c3 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:48:50 +1000 Subject: Rename pmtransprog_t to alpm_transprog_t Signed-off-by: Allan McRae --- src/pacman/callback.c | 2 +- src/pacman/callback.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pacman/callback.c b/src/pacman/callback.c index c59c566f..f579e7ae 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -343,7 +343,7 @@ void cb_trans_conv(alpm_transconv_t event, void *data1, void *data2, } /* callback to handle display of transaction progress */ -void cb_trans_progress(pmtransprog_t event, const char *pkgname, int percent, +void cb_trans_progress(alpm_transprog_t event, const char *pkgname, int percent, size_t howmany, size_t current) { /* size of line to allocate for text printing (e.g. not progressbar) */ diff --git a/src/pacman/callback.h b/src/pacman/callback.h index 388af39d..30b5a71a 100644 --- a/src/pacman/callback.h +++ b/src/pacman/callback.h @@ -32,7 +32,7 @@ void cb_trans_conv(alpm_transconv_t event, void *data1, void *data2, void *data3, int *response); /* callback to handle display of transaction progress */ -void cb_trans_progress(pmtransprog_t event, const char *pkgname, int percent, +void cb_trans_progress(alpm_transprog_t event, const char *pkgname, int percent, size_t howmany, size_t remain); /* callback to handle receipt of total download value */ -- cgit v1.2.3-24-g4f1b From ddad400900fbf253f6e247f51ef4aeb9d89d8643 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:50:48 +1000 Subject: Rename pmerrno_t to alpm_errno_t Signed-off-by: Allan McRae --- src/pacman/conf.c | 2 +- src/pacman/remove.c | 2 +- src/pacman/sync.c | 6 +++--- src/pacman/upgrade.c | 4 ++-- src/pacman/util.c | 2 +- src/util/cleanupdelta.c | 2 +- src/util/pactree.c | 2 +- src/util/testdb.c | 2 +- src/util/testpkg.c | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/pacman/conf.c b/src/pacman/conf.c index d3dbc9da..368e71fa 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -420,7 +420,7 @@ static int _add_mirror(alpm_db_t *db, char *value) static int setup_libalpm(void) { int ret = 0; - enum _pmerrno_t err; + enum _alpm_errno_t err; alpm_handle_t *handle; pm_printf(PM_LOG_DEBUG, "setup_libalpm called\n"); diff --git a/src/pacman/remove.c b/src/pacman/remove.c index eab8bdfc..d48b0386 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -102,7 +102,7 @@ int pacman_remove(alpm_list_t *targets) /* Step 2: prepare the transaction based on its type, targets and flags */ if(alpm_trans_prepare(config->handle, &data) == -1) { - enum _pmerrno_t err = alpm_errno(config->handle); + enum _alpm_errno_t err = alpm_errno(config->handle); pm_fprintf(stderr, PM_LOG_ERROR, _("failed to prepare transaction (%s)\n"), alpm_strerror(err)); switch(err) { diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 5b06a806..20be450c 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -615,7 +615,7 @@ static int process_pkg(alpm_pkg_t *pkg) int ret = alpm_add_pkg(config->handle, pkg); if(ret == -1) { - enum _pmerrno_t err = alpm_errno(config->handle); + enum _alpm_errno_t err = alpm_errno(config->handle); if(err == PM_ERR_TRANS_DUP_TARGET || err == PM_ERR_PKG_IGNORED) { /* just skip duplicate or ignored targets */ @@ -763,7 +763,7 @@ static int sync_trans(alpm_list_t *targets) /* Step 2: "compute" the transaction based on targets and flags */ if(alpm_trans_prepare(config->handle, &data) == -1) { - enum _pmerrno_t err = alpm_errno(config->handle); + enum _alpm_errno_t err = alpm_errno(config->handle); pm_fprintf(stderr, PM_LOG_ERROR, _("failed to prepare transaction (%s)\n"), alpm_strerror(err)); switch(err) { @@ -830,7 +830,7 @@ static int sync_trans(alpm_list_t *targets) } if(alpm_trans_commit(config->handle, &data) == -1) { - enum _pmerrno_t err = alpm_errno(config->handle); + enum _alpm_errno_t err = alpm_errno(config->handle); pm_fprintf(stderr, PM_LOG_ERROR, _("failed to commit transaction (%s)\n"), alpm_strerror(err)); switch(err) { diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c index 7f6e0986..31536a43 100644 --- a/src/pacman/upgrade.c +++ b/src/pacman/upgrade.c @@ -94,7 +94,7 @@ int pacman_upgrade(alpm_list_t *targets) /* Step 2: "compute" the transaction based on targets and flags */ /* TODO: No, compute nothing. This is stupid. */ if(alpm_trans_prepare(config->handle, &data) == -1) { - enum _pmerrno_t err = alpm_errno(config->handle); + enum _alpm_errno_t err = alpm_errno(config->handle); pm_fprintf(stderr, PM_LOG_ERROR, _("failed to prepare transaction (%s)\n"), alpm_strerror(err)); switch(err) { @@ -162,7 +162,7 @@ int pacman_upgrade(alpm_list_t *targets) } if(alpm_trans_commit(config->handle, &data) == -1) { - enum _pmerrno_t err = alpm_errno(config->handle); + enum _alpm_errno_t err = alpm_errno(config->handle); pm_fprintf(stderr, PM_LOG_ERROR, _("failed to commit transaction (%s)\n"), alpm_strerror(err)); switch(err) { diff --git a/src/pacman/util.c b/src/pacman/util.c index a661b2e9..6a93f6df 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -60,7 +60,7 @@ int trans_init(alpm_transflag_t flags) } if(ret == -1) { - enum _pmerrno_t err = alpm_errno(config->handle); + enum _alpm_errno_t err = alpm_errno(config->handle); pm_fprintf(stderr, PM_LOG_ERROR, _("failed to init transaction (%s)\n"), alpm_strerror(err)); if(err == PM_ERR_HANDLE_LOCK) { diff --git a/src/util/cleanupdelta.c b/src/util/cleanupdelta.c index 43897730..70fb7607 100644 --- a/src/util/cleanupdelta.c +++ b/src/util/cleanupdelta.c @@ -96,7 +96,7 @@ static void usage(void) { int main(int argc, char *argv[]) { const char *dbpath = DBPATH; - enum _pmerrno_t err; + enum _alpm_errno_t err; int a = 1; alpm_list_t *dbnames = NULL; diff --git a/src/util/pactree.c b/src/util/pactree.c index bdc1cb2f..7b87ac13 100644 --- a/src/util/pactree.c +++ b/src/util/pactree.c @@ -401,7 +401,7 @@ static void walk_deps(alpm_list_t *dblist, alpm_pkg_t *pkg, int depth) int main(int argc, char *argv[]) { int freelist = 0, ret = 0; - enum _pmerrno_t err; + enum _alpm_errno_t err; const char *target_name; alpm_pkg_t *pkg; alpm_list_t *dblist = NULL; diff --git a/src/util/testdb.c b/src/util/testdb.c index c887f6d5..b8ab33ca 100644 --- a/src/util/testdb.c +++ b/src/util/testdb.c @@ -180,7 +180,7 @@ static void usage(void) { int main(int argc, char *argv[]) { int ret = 0; - enum _pmerrno_t err; + enum _alpm_errno_t err; const char *dbpath = DBPATH; int a = 1; alpm_list_t *dbnames = NULL; diff --git a/src/util/testpkg.c b/src/util/testpkg.c index 70a395e8..a745984d 100644 --- a/src/util/testpkg.c +++ b/src/util/testpkg.c @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) { int retval = 1; /* default = false */ alpm_handle_t *handle; - enum _pmerrno_t err; + enum _alpm_errno_t err; alpm_pkg_t *pkg = NULL; if(argc != 2) { -- cgit v1.2.3-24-g4f1b From f1bb56cebfda9b11ea02754d325ff659014e2caa Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Wed, 29 Jun 2011 15:46:49 +1000 Subject: Rename public functions with grp in their name Using grp instead of group is a small saving at the cost of clarity. Rename the following functions: alpm_option_get_ignoregrps -> alpm_option_get_ignoregroups alpm_option_add_ignoregrp -> alpm_option_add_ignoregroup alpm_option_set_ignoregrps -> alpm_option_set_ignoregroups alpm_option_remove_ignoregrp -> alpm_option_remove_ignoregroup alpm_db_readgrp -> alpm_db_readgroup alpm_db_get_grpcache -> alpm_db_get_groupcache alpm_find_grp_pkgs -> alpm_find_group_pkgs Signed-off-by: Allan McRae --- src/pacman/conf.c | 2 +- src/pacman/query.c | 4 ++-- src/pacman/remove.c | 2 +- src/pacman/sync.c | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 368e71fa..50b4988f 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -502,7 +502,7 @@ static int setup_libalpm(void) alpm_option_set_usedelta(handle, config->usedelta); alpm_option_set_ignorepkgs(handle, config->ignorepkg); - alpm_option_set_ignoregrps(handle, config->ignoregrp); + alpm_option_set_ignoregroups(handle, config->ignoregrp); alpm_option_set_noupgrades(handle, config->noupgrade); alpm_option_set_noextracts(handle, config->noextract); diff --git a/src/pacman/query.c b/src/pacman/query.c index 0a420c78..826c2262 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -302,7 +302,7 @@ static int query_group(alpm_list_t *targets) 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)) { + for(j = alpm_db_get_groupcache(db_local); j; j = alpm_list_next(j)) { alpm_group_t *grp = alpm_list_getdata(j); const alpm_list_t *p; @@ -315,7 +315,7 @@ static int query_group(alpm_list_t *targets) for(i = targets; i; i = alpm_list_next(i)) { alpm_group_t *grp; grpname = alpm_list_getdata(i); - grp = alpm_db_readgrp(db_local, grpname); + grp = alpm_db_readgroup(db_local, grpname); if(grp) { const alpm_list_t *p; for(p = grp->packages; p; p = alpm_list_next(p)) { diff --git a/src/pacman/remove.c b/src/pacman/remove.c index d48b0386..4a23ab2e 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -47,7 +47,7 @@ static int remove_target(const char *target) } /* fallback to group */ - alpm_group_t *grp = alpm_db_readgrp(db_local, target); + alpm_group_t *grp = alpm_db_readgroup(db_local, target); if(grp == NULL) { pm_fprintf(stderr, PM_LOG_ERROR, "'%s': target not found\n", target); return -1; diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 20be450c..ce57d3cd 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -398,7 +398,7 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets) const char *grpname = alpm_list_getdata(i); for(j = syncs; j; j = alpm_list_next(j)) { alpm_db_t *db = alpm_list_getdata(j); - alpm_group_t *grp = alpm_db_readgrp(db, grpname); + alpm_group_t *grp = alpm_db_readgroup(db, grpname); if(grp) { /* get names of packages in group */ @@ -417,7 +417,7 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets) for(i = syncs; i; i = alpm_list_next(i)) { alpm_db_t *db = alpm_list_getdata(i); - for(j = alpm_db_get_grpcache(db); j; j = alpm_list_next(j)) { + for(j = alpm_db_get_groupcache(db); j; j = alpm_list_next(j)) { alpm_group_t *grp = alpm_list_getdata(j); if(level > 1) { @@ -634,7 +634,7 @@ static int process_group(alpm_list_t *dbs, char *group) { int ret = 0; alpm_list_t *i; - alpm_list_t *pkgs = alpm_find_grp_pkgs(dbs, group); + alpm_list_t *pkgs = alpm_find_group_pkgs(dbs, group); int count = alpm_list_count(pkgs); if(!count) { -- cgit v1.2.3-24-g4f1b