/* Step 1: create a new transaction... */
...
/* Step 2: "compute" the transaction based on targets and flags */
if(alpm_trans_prepare(config->handle, &data) == -1) {
...
/* Step 3: actually perform the operation */
if(alpm_trans_commit(config->handle, &data) == -1) {
And I have not checked, but you likely need to release the transaction after interrupting...
Note that whole libalpm is far better documented (in alpm.h) in the current git repo.
]]>init -> (modify transaction) -> commit -> release
| <- interruptible -> |
But I'm not so sure about when should I call alpm_trans_prepare? And do I still need to release the transaction after I have interrupted it?
]]>