From 505ed23e8e3d55b7c99777d455cd462f00a4458e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 21 Jun 2011 15:19:34 +0200 Subject: [PATCH] xbps-src: don't fully error out if pkgdestdir not found while removing. We do the 'xbps-bin remove' way as last resort, and return early in that case. --- xbps-src/shutils/stow_funcs.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xbps-src/shutils/stow_funcs.sh b/xbps-src/shutils/stow_funcs.sh index 5218a8f913..1426b9d9bb 100644 --- a/xbps-src/shutils/stow_funcs.sh +++ b/xbps-src/shutils/stow_funcs.sh @@ -174,7 +174,8 @@ unstow_pkg_real() ver=$($XBPS_PKGDB_CMD version $pkgname) if [ -z "$ver" ]; then - msg_error "$pkgname is not installed.\n" + msg_warn "$pkgname is not installed.\n" + return 0 fi cd $XBPS_PKGMETADIR/$pkgname || exit 1 @@ -186,6 +187,7 @@ unstow_pkg_real() # xbps-bin, so try to remove it. ${XBPS_BIN_CMD} -pyf remove ${pkgname} || \ msg_error "${pkgname}: failed to remove!\n" + return $? elif [ ! -w ${XBPS_PKGMETADIR}/${pkgname}/flist ]; then msg_error "$pkgname cannot be removed (permission denied).\n" elif [ -s ${XBPS_PKGMETADIR}/${pkgname}/flist ]; then