From c520d3845113ce4dc1a473c012288da7f2a655b8 Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Sat, 16 May 2009 16:54:21 +0200 Subject: Introduce PM_TRANS_FLAG_NOLOCK This flag indicates that the front-end will not call alpm_trans_commit(), so the database needn't be locked. This is the first step toward fixing FS#8905. If this flag is set, alpm_trans_commit() does nothing and returns with an error (that has new code: PM_ERR_TRANS_NOT_LOCKED). Signed-off-by: Nagy Gabor Signed-off-by: Dan McGee --- lib/libalpm/error.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/libalpm/error.c') diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c index 47f07508..fdff9ed4 100644 --- a/lib/libalpm/error.c +++ b/lib/libalpm/error.c @@ -99,6 +99,8 @@ const char SYMEXPORT *alpm_strerror(int err) return _("transaction aborted"); case PM_ERR_TRANS_TYPE: return _("operation not compatible with the transaction type"); + case PM_ERR_TRANS_NOT_LOCKED: + return _("transaction commit attempt when database is not locked"); /* Packages */ case PM_ERR_PKG_NOT_FOUND: return _("could not find or read package"); -- cgit v1.2.3-24-g4f1b