Rework how $revision is used. Works much better in all cases.

$version is not modified anymore.

--HG--
extra : convert_revision : a83408f47e22db2f34cd33d6d47eb2f045ae2758
This commit is contained in:
Juan RP 2009-03-28 08:27:29 +01:00
parent e0d52c9d11
commit 75bd88afc6
10 changed files with 106 additions and 60 deletions

View file

@ -145,9 +145,7 @@ list_pkg_files()
#
remove_pkg()
{
local pkg="$1"
local subpkg=
local ver=
local pkg="$1" subpkg ver
[ -z $pkg ] && msg_error "unexistent package, aborting."
@ -168,8 +166,8 @@ remove_pkg()
. $XBPS_SHUTILSDIR/stow_funcs.sh
unstow_pkg $pkg
if [ $? -eq 0 -a -d $XBPS_DESTDIR/$pkg-$ver ]; then
rm -rf $XBPS_DESTDIR/$pkg-$ver
if [ $? -eq 0 -a -d $XBPS_DESTDIR/$pkg-${ver%_${revision}} ]; then
rm -rf $XBPS_DESTDIR/$pkg-${ver%_${revision}}
fi
return $?
}