On Wed, Mar 6, 2013 at 8:04 AM, Renan Biegelmeyer <renan.biegel@gmail.com> wrote:
Hello, I'm trying to understand, in pacman/libalpm code how the transactions work. Are they atomic? If so, the transactions are only atomic for the local database or they are also atomic for the instalation/upgrade/removal of the packages in the system?
They are not atomic, on either the database level or the filesystem level. The word transaction was misused here for sure; it predates all of the current maintainers. Don't see it so much as a database transaction as "Once you call alpm_<sync|remove|upgrade>_commit, I'm reasonably certain I will be able to complete the operation without issue." We've yet to have reports of total local database corruption or anything; this bit could be made to operate in a more atomic manner using rename and such but we haven't done so. -Dan