diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2006-01-07 21:05:10 +0100 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2006-01-07 21:05:10 +0100 |
commit | 77be3f53e9cc128df584a78bffe4d085695ee4fb (patch) | |
tree | c3a3322507ac8f18357e5a42ce198a76aa315ab1 /lib/libalpm | |
parent | 86e5c8bc0649a6df814bdff850a787826612f366 (diff) | |
download | pacman-77be3f53e9cc128df584a78bffe4d085695ee4fb.tar.gz pacman-77be3f53e9cc128df584a78bffe4d085695ee4fb.tar.xz |
removed all code related to PM_SYNC_TYPE_DEPEND
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/alpm.h | 3 | ||||
-rw-r--r-- | lib/libalpm/sync.c | 11 |
2 files changed, 2 insertions, 12 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 321bdc5a..9ec571b0 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -183,8 +183,7 @@ void *alpm_grp_getinfo(PM_GRP *grp, unsigned char parm); enum { PM_SYNC_TYPE_REPLACE = 1, PM_SYNC_TYPE_UPGRADE, - PM_SYNC_TYPE_DEPEND, - PM_SYNC_TYPE_REMOVE + PM_SYNC_TYPE_DEPEND }; /* Info parameters */ enum { diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index fe655b8b..ab1a0fdd 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -621,7 +621,6 @@ int sync_commit(pmtrans_t *trans, pmdb_t *db_local, PMList **data) PMList *i; pmtrans_t *tr = NULL; int replaces = 0; - int removal = 0; ASSERT(db_local != NULL, RET_ERR(PM_ERR_DB_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++; } } - } 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+removal != 0) { + if(replaces) { _alpm_log(PM_LOG_FLOW1, "removing conflicting and to-be-replaced packages"); if(trans_prepare(tr, data) == -1) { _alpm_log(PM_LOG_ERROR, "could not prepare removal transaction"); |