summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-10-19 17:28:52 +0200
committerAaron Griffin <aaron@archlinux.org>2006-10-19 17:28:52 +0200
commite7f886aac3991b6a12ede9781af741b402dffb64 (patch)
tree51b140034a50b92932c2b12d02daf4ad89850343 /lib/libalpm/alpm.c
parent39790dcc1851d4286c3713cbbc2752bdb7ed4c5b (diff)
downloadpacman-e7f886aac3991b6a12ede9781af741b402dffb64.tar.gz
pacman-e7f886aac3991b6a12ede9781af741b402dffb64.tar.xz
From VMiklos <vmiklos@frugalware.org>
* alpm_db_update() fix up the level parameter till now when it was "1", it meant false, which was not in sync with the C logic :)
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r--lib/libalpm/alpm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 6e496971..95264831 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -354,12 +354,12 @@ int alpm_db_setserver(pmdb_t *db, char *url)
}
/** Update a package database
- * @param level control for checking lastupdate time
+ * @param level if true, then forces the update, otherwise update only in case
* @param db pointer to the package database to update
* @return 0 on success, > 0 on error (pm_errno is set accordingly), < 0 if up
* to date
*/
-int alpm_db_update(int level, PM_DB *db)
+int alpm_db_update(int force, PM_DB *db)
{
PMList *lp;
char path[PATH_MAX];
@@ -378,7 +378,7 @@ int alpm_db_update(int level, PM_DB *db)
RET_ERR(PM_ERR_DB_NOT_FOUND, -1);
}
- if(level < 2) {
+ if(!force) {
/* get the lastupdate time */
_alpm_db_getlastupdate(db, lastupdate);
if(strlen(lastupdate) == 0) {