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/alpm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/libalpm/alpm.h') diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 57ea8806..5cf1e940 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -276,7 +276,8 @@ typedef enum _pmtransflag_t { PM_TRANS_FLAG_NEEDED = 0x2000, PM_TRANS_FLAG_ALLEXPLICIT = 0x4000, PM_TRANS_FLAG_UNNEEDED = 0x8000, - PM_TRANS_FLAG_RECURSEALL = 0x10000 + PM_TRANS_FLAG_RECURSEALL = 0x10000, + PM_TRANS_FLAG_NOLOCK = 0x20000 } pmtransflag_t; /** @@ -487,6 +488,7 @@ enum _pmerrno_t { PM_ERR_TRANS_NOT_PREPARED, PM_ERR_TRANS_ABORT, PM_ERR_TRANS_TYPE, + PM_ERR_TRANS_NOT_LOCKED, /* Packages */ PM_ERR_PKG_NOT_FOUND, PM_ERR_PKG_IGNORED, -- cgit v1.2.3-2-g168b