Signed-off-by: Olivier Brunel <[email protected]>
---
This simply adds information about what was actually done, I left the
"synchronizing" message in case it's used by external tools (e.g. pacmatic).

 src/pacman/sync.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 532a667..f8fce7f 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -331,12 +331,18 @@ static int sync_synctree(int level, alpm_list_t *syncs)
 
                int ret = alpm_db_update((level < 2 ? 0 : 1), db);
                if(ret < 0) {
+                       alpm_logaction(config->handle, "failed to update %s 
(%s)\n",
+                                       alpm_db_get_name(db), 
alpm_strerror(alpm_errno(config->handle)));
                        pm_printf(ALPM_LOG_ERROR, _("failed to update %s 
(%s)\n"),
                                        alpm_db_get_name(db), 
alpm_strerror(alpm_errno(config->handle)));
                } else if(ret == 1) {
+                       alpm_logaction(config->handle, "%s is up to date\n",
+                                       alpm_db_get_name(db));
                        printf(_(" %s is up to date\n"), alpm_db_get_name(db));
                        success++;
                } else {
+                       alpm_logaction(config->handle, "synchronized %s\n",
+                                       alpm_db_get_name(db));
                        success++;
                }
        }
-- 
1.8.0.2


Reply via email to