Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/remove.c
diff options
context:
space:
mode:
authorXavier Chantry <chantry.xavier@gmail.com>2010-10-17 19:45:31 +0200
committerXavier Chantry <chantry.xavier@gmail.com>2011-01-29 19:40:08 +0100
commite263cf7231c5d6ec41a15cd6230dbd794b58287a (patch)
tree1a543942b5a575af1193fd86b3b20ef7e999dac0 /lib/libalpm/remove.c
parent05f2abfba9d9e9055c5a2d0d7ae92d24f0dd1a2f (diff)
alpm: drop old target interfaces
It's likely that these interfaces will break sooner or later, now that pacman no longer uses them. So better force the two people who use them to migrate their code to the new add_pkg/remove_pkg interface, which is very easy anyway. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Diffstat (limited to 'lib/libalpm/remove.c')
-rw-r--r--lib/libalpm/remove.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index b2ed220a..5def92a6 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -72,49 +72,6 @@ int SYMEXPORT alpm_remove_pkg(pmpkg_t *pkg)
return(0);
}
-int SYMEXPORT alpm_remove_target(const char *target)
-{
- pmpkg_t *info;
- pmtrans_t *trans;
- pmdb_t *db_local;
- alpm_list_t *p;
-
- ALPM_LOG_FUNC;
-
- /* Sanity checks */
- ASSERT(target != NULL && strlen(target) != 0, RET_ERR(PM_ERR_WRONG_ARGS, -1));
- ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
- trans = handle->trans;
- db_local = handle->db_local;
- ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
- ASSERT(trans->state == STATE_INITIALIZED, RET_ERR(PM_ERR_TRANS_NOT_INITIALIZED, -1));
- ASSERT(db_local != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
-
-
- if(_alpm_pkg_find(trans->remove, target)) {
- RET_ERR(PM_ERR_TRANS_DUP_TARGET, -1);
- }
-
- if((info = _alpm_db_get_pkgfromcache(db_local, target)) != NULL) {
- _alpm_log(PM_LOG_DEBUG, "adding %s in the target list\n", info->name);
- trans->remove = alpm_list_add(trans->remove, _alpm_pkg_dup(info));
- return(0);
- }
-
- _alpm_log(PM_LOG_DEBUG, "could not find %s in database\n", target);
- pmgrp_t *grp = alpm_db_readgrp(db_local, target);
- if(grp == NULL) {
- RET_ERR(PM_ERR_PKG_NOT_FOUND, -1);
- }
- for(p = alpm_grp_get_pkgs(grp); p; p = alpm_list_next(p)) {
- pmpkg_t *pkg = alpm_list_getdata(p);
- _alpm_log(PM_LOG_DEBUG, "adding %s in the target list\n", pkg->name);
- trans->remove = alpm_list_add(trans->remove, _alpm_pkg_dup(pkg));
- }
-
- return(0);
-}
-
static void remove_prepare_cascade(pmtrans_t *trans, pmdb_t *db,
alpm_list_t *lp)
{