[pacman-dev] UPGRADERM patch

Xavier shiningxc at gmail.com
Mon Jun 11 10:32:00 EDT 2007

About Nagy patch and comment here :

I think adding a special UPGRADERM type for this pseudo remove
transaction is better than the previous fix which just added this
check for eliminating duplicated required by :
if(!alpm_list_find_str(rqdby, pkgname)) {

But this just makes the existence of this pseudo remove transaction
more explicit.
And as seen in add.c code, this should be fixed :
362       /* this is kinda odd.  If the old package exists, at this
point we make a
363        * NEW transaction, unrelated to handle->trans, and
instantiate a "remove"
364        * with the type PM_TRANS_TYPE_UPGRADE. TODO: kill this
weird behavior. */

I asked Dan about it on irc :
15:44   shining >> if there is a way to kill this weird behavior
totally, then maybe there should be a bit more details about how to
do, so we can reject Nagy patch ?
16:11   toofishes >> well i sure don't know it yet
16:12   toofishes >> i'm saying this- i hate the way alpm tries to
have these "transactions" that aren't transactional in nature at all
(meaning fully finish or never start)
16:12   toofishes >> alpm_trans_start()
16:12   toofishes >> alpm_install(pkg)
16:12   toofishes >> alpm_remove(pkg)
16:13   toofishes >> alpm_trans_end() (which checks to make sure
transaction is possible)
16:13   toofishes >> alpm_trans_commit() (which carries out the install)

So it looks like there is a lot of work to be done here, for fixing
the problem correctly.

More information about the pacman-dev mailing list