xbps-src: make a warning if pkg is installed when removing.

This commit is contained in:
Juan RP 2011-06-28 19:57:41 +02:00
parent 4478b5ead3
commit 5ecc88fcf8
1 changed files with 3 additions and 1 deletions

View File

@ -218,7 +218,9 @@ remove_pkg()
[ -z $pkgname ] && msg_error "unexistent package, aborting.\n"
ver=$($XBPS_PKGDB_CMD version $pkgname)
[ -z "$ver" ] && msg_error "$pkgname is not installed.\n"
if [ -z "$ver" ]; then
msg_warning "$pkgname is not installed.\n"
fi
. $XBPS_SHUTILSDIR/stow_funcs.sh
stow_pkg_handler unstow || return $?