xbps-src: make unstow work even if build template is missing.

This commit is contained in:
Juan RP 2011-10-26 09:05:10 +02:00
parent 9f65b80448
commit c2b0d7a307
3 changed files with 11 additions and 19 deletions

View file

@ -218,11 +218,11 @@ remove_pkg()
set_tmpl_common_vars
pkg="${subpkg}-${version}"
if [ -d "$XBPS_DESTDIR/${pkg}" ]; then
msg_normal "'${pkg}': removing files from destdir...\n"
msg_normal "${pkgver}: removing files from destdir...\n"
rm -rf "$XBPS_DESTDIR/${pkg}"
found=1
else
msg_warn "'${pkg}' not installed in destdir!\n"
msg_warn "${pkgver}: not installed in destdir!\n"
fi
# Remove leftover files in $wrksrc.
if [ -f "${wrksrc}/.xbps_do_install_${subpkg}_done" ]; then
@ -233,7 +233,7 @@ remove_pkg()
pkg="${pkgname}-${version}"
if [ -d "$XBPS_DESTDIR/${pkg}" ]; then
msg_normal "'${pkg}': removing files from destdir...\n"
msg_normal "${pkgver}: removing files from destdir...\n"
rm -rf "$XBPS_DESTDIR/${pkg}"
found=1
fi
@ -246,8 +246,7 @@ remove_pkg()
if [ -n "$found" ]; then
return 0
else
msg_warn "'${pkg}' not installed in destdir!\n"
return 1
msg_warn "${pkgver}: not installed in destdir!\n"
fi
fi