xbps-src: clean target without args removes autodeps/{build,dest}dir now.

This commit is contained in:
Juan RP 2014-05-23 17:14:00 +02:00
parent 8d5284148e
commit ecdb3900af
1 changed files with 16 additions and 8 deletions

View File

@ -26,8 +26,10 @@ build <pkgname>
chroot chroot
Enter to the chroot in <masterdir>. Enter to the chroot in <masterdir>.
clean <pkgname> clean [pkgname]
Remove <pkgname> build directory. Removes auto dependencies, cleans up <masterdir>/builddir and <masterdir>/destdir.
If <pkgname> argument is specified only the builddir for that package will be
cleaned up.
configure <pkgname> configure <pkgname>
Configure a package (fetch + extract + configure). Configure a package (fetch + extract + configure).
@ -558,13 +560,19 @@ case "$XBPS_TARGET" in
chroot_handler chroot dummy chroot_handler chroot dummy
;; ;;
clean) clean)
read_pkg if [ -z "$XBPS_TARGET_PKG" ]; then
if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then chroot_handler remove-autodeps
chroot_handler $XBPS_TARGET $XBPS_TARGET_PKG || exit $? msg_normal "xbps-src: cleaning up masterdir...\n"
rm -rf $XBPS_MASTERDIR/builddir/* $XBPS_MASTERDIR/destdir/*
else else
remove_pkg_wrksrc $wrksrc read_pkg
if declare -f do_clean >/dev/null; then if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then
run_func do_clean chroot_handler $XBPS_TARGET $XBPS_TARGET_PKG || exit $?
else
remove_pkg_wrksrc $wrksrc
if declare -f do_clean >/dev/null; then
run_func do_clean
fi
fi fi
fi fi
;; ;;