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-04-06 20:28:43 -0500
committerDan McGee <dan@archlinux.org>2008-04-06 20:28:43 -0500
commit9c7ebe68724791f06cdde2febdf91f0472f18407 (patch)
treed0731fda4a5cd2e88763a3bf9ac7f855795d92ba /lib/libalpm/db.c
parent4c872594da321aa406cfb306c32c94ce2929d59e (diff)
Remove a bit more download.h pollution
Kill it where it isn't absolutely necessary. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/db.c')
-rw-r--r--lib/libalpm/db.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 9bdbc7a2..e8ae11a3 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -33,7 +33,6 @@
#include <dirent.h>
#include <regex.h>
#include <time.h>
-#include <download.h> /* downloadLastErrString among others. kill this */
/* libalpm */
#include "db.h"
@@ -254,12 +253,9 @@ int SYMEXPORT alpm_db_update(int force, pmdb_t *db)
pm_errno = 0;
return(1);
} else if(ret == -1) {
- /* we use downloadLastErrString and downloadLastErrCode here,
- * error returns from libdownload */
- /* TODO we may not have used libdownload, this should change */
- _alpm_log(PM_LOG_DEBUG, "failed to sync db: %s [%d]\n",
- downloadLastErrString, downloadLastErrCode);
- RET_ERR(PM_ERR_DB_SYNC, -1);
+ /* pm_errno was set by the download code */
+ _alpm_log(PM_LOG_DEBUG, "failed to sync db: %s\n", alpm_strerrorlast());
+ return(-1);
} else {
/* form the path to the db location */
snprintf(path, PATH_MAX, "%s%s" DBEXT, dbpath, db->treename);