diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2005-04-06 21:00:57 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2005-04-06 21:00:57 +0000 |
commit | e59e963f1f1b1e0d42474f25d6564ec5e949bca1 (patch) | |
tree | 9adfe10add2b670bf00719601da092c9bfc921dd /lib/libalpm/remove.c | |
parent | 48f8f521b16646166c1bc7183ad60b227fc2eea1 (diff) | |
download | pacman-e59e963f1f1b1e0d42474f25d6564ec5e949bca1.tar.xz |
reverted back to trans->packages instead of install and remove queues
Diffstat (limited to 'lib/libalpm/remove.c')
-rw-r--r-- | lib/libalpm/remove.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index 4ac99220..515bc538 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -60,7 +60,7 @@ int remove_loadtarget(pmdb_t *db, pmtrans_t *trans, char *name) _alpm_log(PM_LOG_ERROR, "could not find %s in database", name); RET_ERR(PM_ERR_PKG_NOT_FOUND, -1); } - trans->remove_q = pm_list_add(trans->remove_q, info); + trans->packages = pm_list_add(trans->packages, info); return(0); } @@ -78,19 +78,19 @@ int remove_prepare(pmdb_t *db, pmtrans_t *trans, PMList **data) TRANS_CB(trans, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL); _alpm_log(PM_LOG_FLOW1, "looking for unsatisfied dependencies"); - if((lp = checkdeps(db, trans->type, trans->remove_q)) != NULL) { + if((lp = checkdeps(db, trans->type, trans->packages)) != NULL) { if(trans->flags & PM_TRANS_FLAG_CASCADE) { while(lp) { PMList *j; for(j = lp; j; j = j->next) { pmdepmissing_t* miss = (pmdepmissing_t*)j->data; info = db_scan(db, miss->depend.name, INFRQ_ALL); - if(!pkg_isin(info, trans->remove_q)) { - trans->remove_q = pm_list_add(trans->remove_q, info); + if(!pkg_isin(info, trans->packages)) { + trans->packages = pm_list_add(trans->packages, info); } } FREELIST(lp); - lp = checkdeps(db, trans->type, trans->remove_q); + lp = checkdeps(db, trans->type, trans->packages); } } else { *data = lp; @@ -100,15 +100,15 @@ int remove_prepare(pmdb_t *db, pmtrans_t *trans, PMList **data) if(trans->flags & PM_TRANS_FLAG_RECURSE) { _alpm_log(PM_LOG_FLOW1, "finding removable dependencies"); - trans->remove_q = removedeps(db, trans->remove_q); + trans->packages = removedeps(db, trans->packages); } /* re-order w.r.t. dependencies */ _alpm_log(PM_LOG_FLOW1, "sorting by dependencies"); - lp = sortbydeps(trans->remove_q, PM_TRANS_TYPE_REMOVE); + lp = sortbydeps(trans->packages, PM_TRANS_TYPE_REMOVE); /* free the old alltargs */ - FREELISTPTR(trans->remove_q); - trans->remove_q = lp; + FREELISTPTR(trans->packages); + trans->packages = lp; TRANS_CB(trans, PM_TRANS_EVT_CHECKDEPS_DONE, NULL, NULL); } @@ -126,7 +126,7 @@ int remove_commit(pmdb_t *db, pmtrans_t *trans) ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1)); ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1)); - for(targ = trans->remove_q; targ; targ = targ->next) { + for(targ = trans->packages; targ; targ = targ->next) { char pm_install[PATH_MAX]; info = (pmpkg_t*)targ->data; |