Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/db.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-01-22 22:00:12 -0600
committerDan McGee <dan@archlinux.org>2008-02-24 20:21:58 -0600
commit81a2a06818d367f8528c74311171417beb9e1592 (patch)
tree62f21bce671e41feae2a453bc36561c8cbf4449a /lib/libalpm/db.c
parent3e8ae774bdbc8572613a22988476b6b4e7ef91fd (diff)
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 <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/db.c')
-rw-r--r--lib/libalpm/db.c8
1 files changed, 2 insertions, 6 deletions
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;