summaryrefslogtreecommitdiffstats
path: root/src/pacman/sync.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-11-02 03:29:10 +0100
committerAaron Griffin <aaron@archlinux.org>2006-11-02 03:29:10 +0100
commitfbf1aa653984be4a15714a0efe3acf756daf2d57 (patch)
treeda4f9d026482393f281c627e30e95a740fa48398 /src/pacman/sync.c
parent22ce4a2a006d652219e688c6f082a65366051f71 (diff)
downloadpacman-fbf1aa653984be4a15714a0efe3acf756daf2d57.tar.gz
pacman-fbf1aa653984be4a15714a0efe3acf756daf2d57.tar.xz
* Fixed some alpm_get_option calls (long params were used for C99 compliance,
but were used in error) * Cleaned up some output newlines * Added "local database is up to date" when no packages are upgraded
Diffstat (limited to 'src/pacman/sync.c')
-rw-r--r--src/pacman/sync.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 012a7604..1d1ea29d 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -173,13 +173,18 @@ static int sync_synctree(int level, list_t *syncs)
} else {
ERR(NL, _("failed to update %s (%s)\n"), sync->treename, alpm_strerror(pm_errno));
}
- success--;
} else if(ret == 1) {
MSG(NL, _(" %s is up to date\n"), sync->treename);
+ } else {
+ success++;
}
}
- return(success);
+ /* We should always succeed if at least one DB was upgraded - we may possibly
+ * fail later with unresolved deps, but that should be rare, and would be
+ * expected
+ */
+ return(success > 0);
}
static int sync_search(list_t *syncs, list_t *targets)
@@ -569,6 +574,7 @@ int pacman_sync(list_t *targets)
packages = alpm_trans_getinfo(PM_TRANS_PACKAGES);
if(packages == NULL) {
/* nothing to do: just exit without complaining */
+ MSG(NL," local database is up to date");
goto cleanup;
}