From 83fa6aa2896c0c940e8bf5b7499abc7ef955e658 Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Sat, 25 Aug 2007 00:10:40 +0200 Subject: Remove duplicated get_upgrades function, use sysupgrade instead. The alpm_get_upgrades was exactly the same as find_replacements + _alpm_sync_sysupgrade, except that it automatically made the eventual replacements, without asking the user : Replace %s with %s/%s? [Y/n] The replace question, asked in find_replacements. can now be skipped by using a NULL trans argument, so that we get the same behavior as with alpm_get_upgrades. So alpm_db_get_upgrades() can now be replaced by alpm_sync_sysupgrade(db_local, syncdbs). Signed-off-by: Chantry Xavier Signed-off-by: Dan McGee --- lib/libalpm/trans.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/trans.c') diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index b7085ba1..19ae2b6c 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -298,7 +298,8 @@ int _alpm_trans_sysupgrade(pmtrans_t *trans) /* Sanity checks */ ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1)); - return(_alpm_sync_sysupgrade(trans, handle->db_local, handle->dbs_sync)); + return(_alpm_sync_sysupgrade(trans, handle->db_local, handle->dbs_sync, + &(trans->packages))); } /** Add a target to the transaction. -- cgit v1.2.3-24-g4f1b