Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=13dc914f563bdbea73b39208eeeeaf088c82d473
commit 13dc914f563bdbea73b39208eeeeaf088c82d473 Author: Michel Hermier <herm...@frugalware.org> Date: Tue Nov 5 17:10:45 2013 +0100 libpacman: s/db/db_local/ where appropriate. diff --git a/lib/libpacman/conflict.c b/lib/libpacman/conflict.c index bb1f7a6..75bec57 100644 --- a/lib/libpacman/conflict.c +++ b/lib/libpacman/conflict.c @@ -58,9 +58,9 @@ pmlist_t *_pacman_checkconflicts(pmtrans_t *trans, pmlist_t *packages) pmdepmissing_t *miss = NULL; int howmany, remain; double percent; - pmdb_t *db = trans->handle->db_local; + pmdb_t *db_local = trans->handle->db_local; - if(db == NULL) { + if(db_local == NULL) { return(NULL); } @@ -87,7 +87,7 @@ pmlist_t *_pacman_checkconflicts(pmtrans_t *trans, pmlist_t *packages) } /* CHECK 1: check targets against database */ _pacman_log(PM_LOG_DEBUG, _("checkconflicts: targ '%s' vs db"), tp->name); - for(k = _pacman_db_get_pkgcache(db); k; k = k->next) { + for(k = _pacman_db_get_pkgcache(db_local); k; k = k->next) { pmpkg_t *dp = (pmpkg_t *)k->data; if(!strcmp(dp->name, tp->name)) { /* a package cannot conflict with itself -- that's just not nice */ @@ -159,7 +159,7 @@ pmlist_t *_pacman_checkconflicts(pmtrans_t *trans, pmlist_t *packages) } /* CHECK 3: check database against targets */ _pacman_log(PM_LOG_DEBUG, _("checkconflicts: db vs targ '%s'"), tp->name); - for(k = _pacman_db_get_pkgcache(db); k; k = k->next) { + for(k = _pacman_db_get_pkgcache(db_local); k; k = k->next) { pmlist_t *conflicts = NULL; int usenewconflicts = 0; @@ -267,9 +267,9 @@ pmlist_t *_pacman_db_find_conflicts(pmtrans_t *trans, char *root, pmlist_t **ski pmpkg_t *p, *dbpkg; double percent; int howmany, remain; - pmdb_t *db = trans->handle->db_local; + pmdb_t *db_local = trans->handle->db_local; - if(db == NULL || targets == NULL || root == NULL) { + if(db_local == NULL || targets == NULL || root == NULL) { return(NULL); } howmany = _pacman_list_count(targets); @@ -318,11 +318,11 @@ pmlist_t *_pacman_db_find_conflicts(pmtrans_t *trans, char *root, pmlist_t **ski ok = 1; } else { if(dbpkg == NULL) { - dbpkg = _pacman_db_get_pkgfromcache(db, p->name); + dbpkg = _pacman_db_get_pkgfromcache(db_local, p->name); } if(dbpkg && !(dbpkg->infolevel & INFRQ_FILES)) { _pacman_log(PM_LOG_DEBUG, _("loading FILES info for '%s'"), dbpkg->name); - _pacman_db_read(db, INFRQ_FILES, dbpkg); + _pacman_db_read(db_local, INFRQ_FILES, dbpkg); } if(dbpkg && _pacman_list_is_strin(j->data, dbpkg->files)) { ok = 1; @@ -335,10 +335,10 @@ pmlist_t *_pacman_db_find_conflicts(pmtrans_t *trans, char *root, pmlist_t **ski /* As long as they're not the current package */ if(strcmp(p2->name, p->name)) { pmpkg_t *dbpkg2 = NULL; - dbpkg2 = _pacman_db_get_pkgfromcache(db, p2->name); + dbpkg2 = _pacman_db_get_pkgfromcache(db_local, p2->name); if(dbpkg2 && !(dbpkg2->infolevel & INFRQ_FILES)) { _pacman_log(PM_LOG_DEBUG, _("loading FILES info for '%s'"), dbpkg2->name); - _pacman_db_read(db, INFRQ_FILES, dbpkg2); + _pacman_db_read(db_local, INFRQ_FILES, dbpkg2); } /* If it used to exist in there, but doesn't anymore */ if(dbpkg2 && !_pacman_list_is_strin(filestr, p2->files) && _pacman_list_is_strin(filestr, dbpkg2->files)) { diff --git a/lib/libpacman/deps.c b/lib/libpacman/deps.c index 49e70e6..dc9aa5c 100644 --- a/lib/libpacman/deps.c +++ b/lib/libpacman/deps.c @@ -213,9 +213,9 @@ pmlist_t *_pacman_checkdeps(pmtrans_t *trans, unsigned char op, pmlist_t *packag int found = 0; pmlist_t *baddeps = NULL; pmdepmissing_t *miss = NULL; - pmdb_t *db = trans->handle->db_local; + pmdb_t *db_local = trans->handle->db_local; - if(db == NULL) { + if(db_local == NULL) { return(NULL); } @@ -230,14 +230,14 @@ pmlist_t *_pacman_checkdeps(pmtrans_t *trans, unsigned char op, pmlist_t *packag continue; } - if((oldpkg = _pacman_db_get_pkgfromcache(db, tp->name)) == NULL) { + if((oldpkg = _pacman_db_get_pkgfromcache(db_local, tp->name)) == NULL) { continue; } for(j = _pacman_pkg_getinfo(oldpkg, PM_PKG_REQUIREDBY); j; j = j->next) { //char *ver; pmpkg_t *p; found = 0; - if((p = _pacman_db_get_pkgfromcache(db, j->data)) == NULL) { + if((p = _pacman_db_get_pkgfromcache(db_local, j->data)) == NULL) { /* hmmm... package isn't installed.. */ continue; } @@ -276,7 +276,7 @@ pmlist_t *_pacman_checkdeps(pmtrans_t *trans, unsigned char op, pmlist_t *packag _pacman_splitdep((char *)j->data, &depend); found = 0; /* check database for literal packages */ - for(k = _pacman_db_get_pkgcache(db); k && !found; k = k->next) { + for(k = _pacman_db_get_pkgcache(db_local); k && !found; k = k->next) { pmpkg_t *p = (pmpkg_t *)k->data; if(!strcmp(p->name, depend.name)) { if(depend.mod == PM_DEP_MOD_ANY) { @@ -307,7 +307,7 @@ pmlist_t *_pacman_checkdeps(pmtrans_t *trans, unsigned char op, pmlist_t *packag /* check database for provides matches */ if(!found) { pmlist_t *m; - k = _pacman_db_whatprovides(db, depend.name); + k = _pacman_db_whatprovides(db_local, depend.name); for(m = k; m && !found; m = m->next) { /* look for a match that isn't one of the packages we're trying * to install. this way, if we match against a to-be-installed _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git