From ef4757afa5d31ff6a6c09e3410c889f152826f4f Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 29 Jul 2011 17:03:07 -0500 Subject: Store a package info level flag if we fail to load data If we are missing a local database file, we get repeated messages over and over telling us the same thing, rather than being sane and erroring only once. This package adds an INFRQ_ERROR level that is added to the mask if we encounter any errors on a local_db_read() operation, and short circuits future calls if found in the value. This fixes FS#25313. Note that this does not make any behavior changes other than suppressing error messages and repeated code calls to failure cases; we still have more to do in the "local database is hosed" department. Also make a small update to the wrong but unused flags set in be_package; using INFRQ_ALL there was not totally correct. Signed-off-by: Dan McGee --- lib/libalpm/be_package.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/be_package.c') diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c index 7e90af71..f80790cd 100644 --- a/lib/libalpm/be_package.c +++ b/lib/libalpm/be_package.c @@ -436,9 +436,9 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, const char *pkgfile, _alpm_log(handle, ALPM_LOG_DEBUG, "sorting package filelist for %s\n", pkgfile); newpkg->files.files = files_msort(files, files_count); newpkg->files.count = files_count; - newpkg->infolevel = INFRQ_ALL; + newpkg->infolevel = INFRQ_BASE | INFRQ_DESC | INFRQ_FILES | INFRQ_SCRIPTLET; } else { - newpkg->infolevel = INFRQ_BASE | INFRQ_DESC; + newpkg->infolevel = INFRQ_BASE | INFRQ_DESC | INFRQ_SCRIPTLET; } return newpkg; -- cgit v1.2.3-24-g4f1b