From 81a2a06818d367f8528c74311171417beb9e1592 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 22 Jan 2008 22:00:12 -0600 Subject: Add new stub download functions for use throughout the code Add new stub functions that work by calling the existing (terrible) download forreal function, which needs a serious overhaul. Hide the existing functions and switch all former users to the new functions. Signed-off-by: Dan McGee --- lib/libalpm/db.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/libalpm/db.c') diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index da9b9274..9dce4aff 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -219,7 +219,6 @@ int SYMEXPORT alpm_db_update(int force, pmdb_t *db) { alpm_list_t *lp; char path[PATH_MAX]; - alpm_list_t *files = NULL; time_t newmtime = 0, lastupdate = 0; const char *dbpath; int ret; @@ -252,13 +251,10 @@ int SYMEXPORT alpm_db_update(int force, pmdb_t *db) /* build a one-element list */ snprintf(path, PATH_MAX, "%s" DBEXT, db->treename); - files = alpm_list_add(files, strdup(path)); - dbpath = alpm_option_get_dbpath(); - ret = _alpm_downloadfiles_forreal(db->servers, dbpath, files, lastupdate, - &newmtime, NULL, 0); - FREELIST(files); + ret = _alpm_download_single_file(path, db->servers, dbpath, lastupdate, &newmtime); + if(ret == 1) { /* mtimes match, do nothing */ pm_errno = 0; -- cgit v1.2.3-24-g4f1b