Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2011-06-28 23:26:39 +1000
committerAllan McRae <allan@archlinux.org>2011-06-28 23:26:39 +1000
commit8a04bc25a14df93c0ca207ac83d43cdb867346a1 (patch)
tree764d2c1ffbd7bbbb6578c63550f334c1abfe84e2 /src
parent939d5a9511b2dcbb07390ecfcd23528d8034709b (diff)
Rename pmpkg_t to alpm_pkg_t
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/package.c8
-rw-r--r--src/pacman/package.h8
-rw-r--r--src/pacman/query.c22
-rw-r--r--src/pacman/remove.c6
-rw-r--r--src/pacman/sync.c26
-rw-r--r--src/pacman/upgrade.c2
-rw-r--r--src/pacman/util.c20
-rw-r--r--src/pacman/util.h4
-rw-r--r--src/util/cleanupdelta.c2
-rw-r--r--src/util/pactree.c12
-rw-r--r--src/util/testpkg.c2
11 files changed, 56 insertions, 56 deletions
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 <package file>\n", BASENAME);