You are not logged in.
Pages: 1
Hi all. I'm writing a Haskell binding to libalpm(https://github.com/poscat0x04/alpm4h) and I'm having trouble understanding what does these transaction functions do.
My understanding of the transaction process is as following:
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?
Last edited by poscat (2020-02-19 13:01:17)
Offline
From the pacman code:
/* 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.
Offline
Also, the #archlinux-pacman IRC channel is probably your best bet for answers.
Offline
Thanks.
Offline
Pages: 1