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/sync.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/sync.h') diff --git a/lib/libalpm/sync.h b/lib/libalpm/sync.h index a5f35607..0ef42627 100644 --- a/lib/libalpm/sync.h +++ b/lib/libalpm/sync.h @@ -35,7 +35,9 @@ struct __pmsyncpkg_t { pmsyncpkg_t *_alpm_sync_new(int type, pmpkg_t *spkg, void *data); void _alpm_sync_free(pmsyncpkg_t *data); -int _alpm_sync_sysupgrade(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync); +int _alpm_sync_sysupgrade(pmtrans_t *trans, + pmdb_t *db_local, alpm_list_t *dbs_sync, alpm_list_t **syncpkgs); + int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync, char *name); int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync, alpm_list_t **data); int _alpm_sync_commit(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t **data); -- cgit v1.2.3-24-g4f1b