[pacman-dev] [PATCH] Do not print warning with files entry in sync db

Allan McRae allan at archlinux.org
Sun Mar 6 02:47:02 EST 2011


repo-add can add a "files" entry into the sync db.  Currently we
do nothing with this file, so explicitly skip it to prevent
unknown database file warnings.

Signed-off-by: Allan McRae <allan at archlinux.org>
---
 lib/libalpm/be_sync.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 5faf0b8..6c0d2d6 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -432,9 +432,11 @@ static int sync_db_read(pmdb_t *db, struct archive *archive,
 				READ_AND_STORE_ALL(pkg->deltas);
 			}
 		}
+	} else if(strcmp(filename, "files") == 0) {
+		/* currently do nothing with this file */
 	} else {
-		 /* unknown database file */
-		_alpm_log(PM_LOG_DEBUG, "unknown database file: %s", filename);
+		/* unknown database file */
+		_alpm_log(PM_LOG_DEBUG, "unknown database file: %s\n", filename);
 	}
 
 error:
-- 
1.7.4.1



More information about the pacman-dev mailing list