[pacman-dev] [PATCH 2/3] Log only when, and which, database was synchronized

Olivier Brunel i.am.jack.mail at gmail.com
Thu Dec 13 06:38:16 EST 2012


Instead of always logging "synchronizing package databases" we only log when
(and which) db was synchronized.

Signed-off-by: Olivier Brunel <i.am.jack.mail at gmail.com>
---
 src/pacman/sync.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 938f9d6..6c8923d 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -338,6 +338,8 @@ static int sync_synctree(int level, alpm_list_t *syncs)
 			success++;
 		} else {
 			success++;
+			alpm_logaction(config->handle, _("synchronized database %s\n"),
+					alpm_db_get_name(db));
 		}
 	}
 
@@ -954,7 +956,6 @@ int pacman_sync(alpm_list_t *targets)
 	if(config->op_s_sync) {
 		/* grab a fresh package list */
 		printf(_(":: Synchronizing package databases...\n"));
-		alpm_logaction(config->handle, _("synchronizing package lists\n"));
 		if(!sync_synctree(config->op_s_sync, sync_dbs)) {
 			return 1;
 		}
-- 
1.8.0.2



More information about the pacman-dev mailing list