summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/db.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-07-30 00:03:07 +0200
committerDan McGee <dan@archlinux.org>2011-08-08 23:56:48 +0200
commitef4757afa5d31ff6a6c09e3410c889f152826f4f (patch)
treea801e8b6d7bfc07a3d769993464a19d428c87f9b /lib/libalpm/db.h
parentd9f9b87d3ff6621577aa15bf3304f73219f6d5f1 (diff)
downloadpacman-ef4757afa5d31ff6a6c09e3410c889f152826f4f.tar.gz
pacman-ef4757afa5d31ff6a6c09e3410c889f152826f4f.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/db.h')
-rw-r--r--lib/libalpm/db.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h
index 5c7988b4..a09c7e26 100644
--- a/lib/libalpm/db.h
+++ b/lib/libalpm/db.h
@@ -40,7 +40,8 @@ typedef enum _alpm_dbinfrq_t {
INFRQ_SCRIPTLET = (1 << 3),
INFRQ_DSIZE = (1 << 4),
/* ALL should be info stored in the package or database */
- INFRQ_ALL = 0x1F
+ INFRQ_ALL = 0x1F,
+ INFRQ_ERROR = (1 << 31)
} alpm_dbinfrq_t;
/** Database status. Bitflags. */