removed all code related to PM_SYNC_TYPE_DEPEND

This commit is contained in:
Aurelien Foret 2006-01-07 20:05:10 +00:00
parent 86e5c8bc06
commit 77be3f53e9
2 changed files with 2 additions and 12 deletions

View file

@ -183,8 +183,7 @@ void *alpm_grp_getinfo(PM_GRP *grp, unsigned char parm);
enum { enum {
PM_SYNC_TYPE_REPLACE = 1, PM_SYNC_TYPE_REPLACE = 1,
PM_SYNC_TYPE_UPGRADE, PM_SYNC_TYPE_UPGRADE,
PM_SYNC_TYPE_DEPEND, PM_SYNC_TYPE_DEPEND
PM_SYNC_TYPE_REMOVE
}; };
/* Info parameters */ /* Info parameters */
enum { enum {

View file

@ -621,7 +621,6 @@ int sync_commit(pmtrans_t *trans, pmdb_t *db_local, PMList **data)
PMList *i; PMList *i;
pmtrans_t *tr = NULL; pmtrans_t *tr = NULL;
int replaces = 0; int replaces = 0;
int removal = 0;
ASSERT(db_local != NULL, RET_ERR(PM_ERR_DB_NULL, -1)); ASSERT(db_local != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1)); ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
@ -652,17 +651,9 @@ int sync_commit(pmtrans_t *trans, pmdb_t *db_local, PMList **data)
replaces++; replaces++;
} }
} }
} else if(sync->type == PM_SYNC_TYPE_REMOVE) {
pmpkg_t *pkg = sync->data;
if(!pkg_isin(pkg, tr->packages)) {
if(trans_addtarget(tr, pkg->name) == -1) {
goto error;
}
removal++;
} }
} }
} if(replaces) {
if(replaces+removal != 0) {
_alpm_log(PM_LOG_FLOW1, "removing conflicting and to-be-replaced packages"); _alpm_log(PM_LOG_FLOW1, "removing conflicting and to-be-replaced packages");
if(trans_prepare(tr, data) == -1) { if(trans_prepare(tr, data) == -1) {
_alpm_log(PM_LOG_ERROR, "could not prepare removal transaction"); _alpm_log(PM_LOG_ERROR, "could not prepare removal transaction");