Remove unnecessary trans parameter from _alpm_checkdeps

The trans parameter was never used, so remove it.

Signed-off-by: Nagy Gabor <ngaba@petra.hos.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Nagy Gabor 2007-06-18 10:40:23 -04:00 committed by Dan McGee
parent 2ae0438660
commit da66bedf4f
5 changed files with 8 additions and 9 deletions

View file

@ -189,7 +189,7 @@ int _alpm_add_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
/* look for unsatisfied dependencies */ /* look for unsatisfied dependencies */
_alpm_log(PM_LOG_DEBUG, _("looking for unsatisfied dependencies")); _alpm_log(PM_LOG_DEBUG, _("looking for unsatisfied dependencies"));
lp = _alpm_checkdeps(trans, db, trans->type, trans->packages); lp = _alpm_checkdeps(db, trans->type, trans->packages);
if(lp != NULL) { if(lp != NULL) {
if(data) { if(data) {
*data = lp; *data = lp;

View file

@ -219,13 +219,12 @@ alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode)
} }
/** Checks dependencies and returns missing ones in a list. Dependencies can include versions with depmod operators. /** Checks dependencies and returns missing ones in a list. Dependencies can include versions with depmod operators.
* @param trans pointer to the transaction object
* @param db pointer to the local package database * @param db pointer to the local package database
* @param op transaction type * @param op transaction type
* @param packages an alpm_list_t* of packages to be checked * @param packages an alpm_list_t* of packages to be checked
* @return an alpm_list_t* of missing_t pointers. * @return an alpm_list_t* of missing_t pointers.
*/ */
alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op, alpm_list_t *_alpm_checkdeps(pmdb_t *db, pmtranstype_t op,
alpm_list_t *packages) alpm_list_t *packages)
{ {
alpm_list_t *i, *j, *k, *l; alpm_list_t *i, *j, *k, *l;
@ -592,7 +591,7 @@ int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg,
_alpm_log(PM_LOG_DEBUG, _("started resolving dependencies")); _alpm_log(PM_LOG_DEBUG, _("started resolving dependencies"));
targ = alpm_list_add(NULL, syncpkg); targ = alpm_list_add(NULL, syncpkg);
deps = _alpm_checkdeps(trans, local, PM_TRANS_TYPE_ADD, targ); deps = _alpm_checkdeps(local, PM_TRANS_TYPE_ADD, targ);
alpm_list_free(targ); alpm_list_free(targ);
if(deps == NULL) { if(deps == NULL) {

View file

@ -56,7 +56,7 @@ pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdeptype_t type,
const char *depversion); const char *depversion);
int _alpm_depmiss_isin(pmdepmissing_t *needle, alpm_list_t *haystack); int _alpm_depmiss_isin(pmdepmissing_t *needle, alpm_list_t *haystack);
alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode); alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode);
alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op, alpm_list_t *_alpm_checkdeps(pmdb_t *db, pmtranstype_t op,
alpm_list_t *packages); alpm_list_t *packages);
alpm_list_t *_alpm_removedeps(pmdb_t *db, alpm_list_t *targs); alpm_list_t *_alpm_removedeps(pmdb_t *db, alpm_list_t *targs);
int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg, int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg,

View file

@ -108,7 +108,7 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
EVENT(trans, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL); EVENT(trans, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL);
_alpm_log(PM_LOG_DEBUG, _("looking for unsatisfied dependencies")); _alpm_log(PM_LOG_DEBUG, _("looking for unsatisfied dependencies"));
lp = _alpm_checkdeps(trans, db, trans->type, trans->packages); lp = _alpm_checkdeps(db, trans->type, trans->packages);
if(lp != NULL) { if(lp != NULL) {
if(trans->flags & PM_TRANS_FLAG_CASCADE) { if(trans->flags & PM_TRANS_FLAG_CASCADE) {
while(lp) { while(lp) {
@ -125,7 +125,7 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
} }
} }
FREELIST(lp); FREELIST(lp);
lp = _alpm_checkdeps(trans, db, trans->type, trans->packages); lp = _alpm_checkdeps(db, trans->type, trans->packages);
} }
} else { } else {
if(data) { if(data) {

View file

@ -464,7 +464,7 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
EVENT(trans, PM_TRANS_EVT_RESOLVEDEPS_DONE, NULL, NULL); EVENT(trans, PM_TRANS_EVT_RESOLVEDEPS_DONE, NULL, NULL);
_alpm_log(PM_LOG_DEBUG, _("looking for unresolvable dependencies")); _alpm_log(PM_LOG_DEBUG, _("looking for unresolvable dependencies"));
deps = _alpm_checkdeps(trans, db_local, PM_TRANS_TYPE_UPGRADE, list); deps = _alpm_checkdeps(db_local, PM_TRANS_TYPE_UPGRADE, list);
if(deps) { if(deps) {
if(data) { if(data) {
*data = deps; *data = deps;
@ -675,7 +675,7 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
} }
if(list) { if(list) {
_alpm_log(PM_LOG_DEBUG, _("checking dependencies of packages designated for removal")); _alpm_log(PM_LOG_DEBUG, _("checking dependencies of packages designated for removal"));
deps = _alpm_checkdeps(trans, db_local, PM_TRANS_TYPE_REMOVE, list); deps = _alpm_checkdeps(db_local, PM_TRANS_TYPE_REMOVE, list);
if(deps) { if(deps) {
/* Check if broken dependencies are fixed by packages we are installing */ /* Check if broken dependencies are fixed by packages we are installing */
int errorout = 0; int errorout = 0;