From f5d904d97f66d5e3337578541f2f440e846b9490 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Mon, 29 Oct 2012 15:35:41 +1000 Subject: Do not warn about missing database if being downloaded When a configured repo database is not already downloaded, a warning message such as "warning: database file for 'testing' does not exist" is printed. Disable this warning when the database is scheduled to be downloaded in the transaction. Signed-off-by: Allan McRae --- lib/libalpm/alpm.h | 4 +++- lib/libalpm/be_sync.c | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index d2d6055d..f1c6efd3 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -351,7 +351,9 @@ typedef enum _alpm_event_t { ALPM_EVENT_DISKSPACE_DONE, /** An optdepend for another package is being removed * The requiring package and its dependency are passed to the callback */ - ALPM_EVENT_OPTDEP_REQUIRED + ALPM_EVENT_OPTDEP_REQUIRED, + /** A configured repository database is missing */ + ALPM_EVENT_DATABASE_MISSING } alpm_event_t; /** Event callback */ diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index 6bac6fbf..60094552 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -89,8 +89,7 @@ static int sync_db_validate(alpm_db_t *db) if(_alpm_access(db->handle, NULL, dbpath, R_OK) != 0 && errno == ENOENT) { db->status &= ~DB_STATUS_EXISTS; db->status |= DB_STATUS_MISSING; - _alpm_log(db->handle, ALPM_LOG_WARNING, - "database file for '%s' does not exist\n", db->treename); + EVENT(db->handle, ALPM_EVENT_DATABASE_MISSING, db->treename, NULL); goto valid; } db->status |= DB_STATUS_EXISTS; -- cgit v1.2.3-70-g09d2