From 448b43a5d2067c56b0752e65741cef37febc69ae Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Tue, 12 Mar 2024 08:14:41 -0700 Subject: [PATCH] allow committing transaction without a lock file This is useful to allow front-ends to manage the lock file themselves, allowing them to ensure database consistency across multiple commands, e.g.: paclock --lock pacinstall --no-lock foo # foo is guaranteed to be installed until the db is unlocked paclock --unlock Signed-off-by: Andrew Gregory --- lib/libalpm/trans.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index 5e2458e9..d311ca46 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -177,8 +177,6 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data) ASSERT(trans != NULL, RET_ERR(handle, ALPM_ERR_TRANS_NULL, -1)); ASSERT(trans->state == STATE_PREPARED, RET_ERR(handle, ALPM_ERR_TRANS_NOT_PREPARED, -1)); - ASSERT(!(trans->flags & ALPM_TRANS_FLAG_NOLOCK), RET_ERR(handle, ALPM_ERR_TRANS_NOT_LOCKED, -1)); - /* If there's nothing to do, return without complaining */ if(trans->add == NULL && trans->remove == NULL) { return 0;