[pacman-dev] [PATCH] trans_release: do not error on STATE_IDLE

Andrew Gregory andrew.gregory.8 at gmail.com
Sun Apr 6 11:10:45 EDT 2014


If a transaction were actually in STATE_IDLE, which it should never be,
the handle would be stuck with a useless transaction and lock file that
it can't remove.

Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
---
 lib/libalpm/trans.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index e5328c5..0c84bb0 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -222,7 +222,6 @@ int SYMEXPORT alpm_trans_release(alpm_handle_t *handle)
 
 	trans = handle->trans;
 	ASSERT(trans != NULL, RET_ERR(handle, ALPM_ERR_TRANS_NULL, -1));
-	ASSERT(trans->state != STATE_IDLE, RET_ERR(handle, ALPM_ERR_TRANS_NULL, -1));
 
 	int nolock_flag = trans->flags & ALPM_TRANS_FLAG_NOLOCK;
 
-- 
1.9.1



More information about the pacman-dev mailing list