diff options
author | Chantry Xavier <shiningxc@gmail.com> | 2008-03-16 22:36:31 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-03-17 21:01:22 -0500 |
commit | e7a2232934e2658c3c7827d2ce706c1a8f5301b9 (patch) | |
tree | 79d26379d9be1f1ca606e17d8d2e319b7f1e6985 /lib/libalpm/add.c | |
parent | 73ab153c44a1581b4bcf1e64eb6042b0631c2e66 (diff) |
Kill PM_TRANS_TYPE_ADD.
This was totally useless.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r-- | lib/libalpm/add.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 5dcc0587..78f6e951 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -68,14 +68,6 @@ int _alpm_add_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name) pkgname = alpm_pkg_get_name(pkg); pkgver = alpm_pkg_get_version(pkg); - if(trans->type != PM_TRANS_TYPE_UPGRADE) { - /* only install this package if it is not already installed */ - if(_alpm_db_get_pkgfromcache(db, pkgname)) { - pm_errno = PM_ERR_PKG_INSTALLED; - goto error; - } - } - /* check if an older version of said package is already in transaction * packages. if so, replace it in the list */ for(i = trans->packages; i; i = i->next) { @@ -130,7 +122,7 @@ int _alpm_add_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data) /* look for unsatisfied dependencies */ _alpm_log(PM_LOG_DEBUG, "looking for unsatisfied dependencies\n"); - lp = alpm_checkdeps(db, trans->type == PM_TRANS_TYPE_UPGRADE, NULL, trans->packages); + lp = alpm_checkdeps(db, 1, NULL, trans->packages); if(lp != NULL) { if(data) { *data = lp; @@ -168,7 +160,7 @@ int _alpm_add_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data) /* re-order w.r.t. dependencies */ _alpm_log(PM_LOG_DEBUG, "sorting by dependencies\n"); - lp = _alpm_sortbydeps(trans->packages, PM_TRANS_TYPE_ADD); + lp = _alpm_sortbydeps(trans->packages, 0); /* free the old alltargs */ alpm_list_free(trans->packages); trans->packages = lp; |