libalpm/trans.c : fix a recently introduced breakage in scriptlets handling.
commit3d7e06f204d7f94aa9d22cd4e4a895d2780025e8
authorChantry Xavier <shiningxc@gmail.com>
Sun, 14 Oct 2007 08:17:48 +0000 (14 10:17 +0200)
committerDan McGee <dan@archlinux.org>
Sun, 14 Oct 2007 23:47:19 +0000 (14 18:47 -0500)
tree516677a3c2c734ba82ac46dd4bfa0c7535e68736
parent4e6a03c4f6d413aa9f1c98d255c370c442ce55eb
libalpm/trans.c : fix a recently introduced breakage in scriptlets handling.

Commit 4853a4aad97fe36f9237ffb7356201adab507a1c used the tmpdir variable
for checking the existence of /bin/sh, without resetting it.

This caused /bin/sh to be deleted during the cleanup part, as soon as a scriptlet
other than pre_upgrade or pre_install was executed.
For example, on the first post_upgrade during a -Su.

I introduced two variables : clean_tmpdir and restore_cwd, for deciding what should
be done in the cleanup part.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
lib/libalpm/trans.c