xbps-src: remove a pkg thru the chroot handler to fix some bugs in pre/post_remove funcs.

This commit is contained in:
Juan RP 2011-06-16 12:21:12 +02:00
parent 88d2739d94
commit c912ce0eef
3 changed files with 9 additions and 8 deletions

View file

@ -161,12 +161,10 @@ stow_pkg_real()
#
unstow_pkg_real()
{
local f ver lpwd
local f ver
[ -z $pkgname ] && return 1
lpwd=$(pwd)
if [ $(id -u) -ne 0 ] && \
[ ! -w $XBPS_MASTERDIR ]; then
msg_error "cannot unstow $pkgname! (permission denied)\n"
@ -214,8 +212,6 @@ unstow_pkg_real()
rm -rf $XBPS_PKGMETADIR/$pkgname
# Unregister pkg from plist file.
$XBPS_PKGDB_CMD unregister $pkgname $ver || return $?
cd ${lwd}
$XBPS_PKGDB_CMD unregister $pkgname $ver
return $?
}