From 22a58f5420438f35effb991696d37529d7a31969 Mon Sep 17 00:00:00 2001 From: Anatol Pomozov Date: Sat, 18 Apr 2020 19:15:44 -0700 Subject: Swap alpm_db_update() implementation to multiplexed version Now when all callers of the old alpm_db_update() function are gone we can remove this implementation. And then rename alpm_dbs_update() function to alpm_db_update(). Signed-off-by: Anatol Pomozov Signed-off-by: Allan McRae --- lib/libalpm/alpm.h | 40 ++-------------------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) (limited to 'lib/libalpm/alpm.h') diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 903e2fbc..3ea66ccc 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -1039,42 +1039,6 @@ int alpm_db_add_server(alpm_db_t *db, const char *url); int alpm_db_remove_server(alpm_db_t *db, const char *url); /** @} */ -/** Update a package database - * - * An update of the package database \a db will be attempted. Unless - * \a force is true, the update will only be performed if the remote - * database was modified since the last update. - * - * This operation requires a database lock, and will return an applicable error - * if the lock could not be obtained. - * - * Example: - * @code - * alpm_list_t *syncs = alpm_get_syncdbs(); - * for(i = syncs; i; i = alpm_list_next(i)) { - * alpm_db_t *db = alpm_list_getdata(i); - * result = alpm_db_update(0, db); - * - * if(result < 0) { - * printf("Unable to update database: %s\n", alpm_strerrorlast()); - * } else if(result == 1) { - * printf("Database already up to date\n"); - * } else { - * printf("Database updated\n"); - * } - * } - * @endcode - * - * @note After a successful update, the \link alpm_db_get_pkgcache() - * package cache \endlink will be invalidated - * @param force if true, then forces the update, otherwise update only in case - * the database isn't up to date - * @param db pointer to the package database to update - * @return 0 on success, -1 on error (pm_errno is set accordingly), 1 if up to - * to date - */ -int alpm_db_update(int force, alpm_db_t *db); - /** Update package databases * * An update of the package databases in the list \a dbs will be attempted. @@ -1087,7 +1051,7 @@ int alpm_db_update(int force, alpm_db_t *db); * Example: * @code * alpm_list_t *dbs = alpm_get_syncdbs(); - * ret = alpm_dbs_update(config->handle, dbs, force); + * ret = alpm_db_update(config->handle, dbs, force); * if(ret < 0) { * pm_printf(ALPM_LOG_ERROR, _("failed to synchronize all databases (%s)\n"), * alpm_strerror(alpm_errno(config->handle))); @@ -1102,7 +1066,7 @@ int alpm_db_update(int force, alpm_db_t *db); * the databases aren't up to date * @return 0 on success, -1 on error (pm_errno is set accordingly) */ -int alpm_dbs_update(alpm_handle_t *handle, alpm_list_t *dbs, int force); +int alpm_db_update(alpm_handle_t *handle, alpm_list_t *dbs, int force); /** Get a package entry from a package database. * @param db pointer to the package database to get the package from -- cgit v1.2.3-54-g00ecf