From 5cf08f1381faabdbe124ad22d39f5ad4d500a4af Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 16 Nov 2011 17:59:33 +0100 Subject: [PATCH] xbps-src: new target: clean-autodeps. To force autodeps removal. --- xbps-src/shutils/builddep_funcs.sh | 2 +- xbps-src/xbps-src.sh.in | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/xbps-src/shutils/builddep_funcs.sh b/xbps-src/shutils/builddep_funcs.sh index d01e3ecb662..f7f41d15ae3 100644 --- a/xbps-src/shutils/builddep_funcs.sh +++ b/xbps-src/shutils/builddep_funcs.sh @@ -92,7 +92,7 @@ autoremove_pkg_dependencies() if [ -n "$XBPS_PREFER_BINPKG_DEPS" -a -z "$bootstrap" ]; then msg_normal "$pkgver: removing automatically installed dependencies ...\n" # Autoremove installed binary packages. - ${cmd} -y reconfigure all && ${cmd} -Rpyf autoremove 2>&1 >/dev/null + ${cmd} -y reconfigure all && ${cmd} -Rpyf autoremove if [ $? -ne 0 ]; then msg_red "$pkgver: failed to remove automatic dependencies!\n" exit 1 diff --git a/xbps-src/xbps-src.sh.in b/xbps-src/xbps-src.sh.in index 822814563c2..6075c8b6410 100644 --- a/xbps-src/xbps-src.sh.in +++ b/xbps-src/xbps-src.sh.in @@ -85,6 +85,9 @@ Targets: clean [pkgname] Remove build directory. + clean-autodeps + Removes all package dependencies installed automatically. + configure [pkgname] Configure a package (fetch + extract + configure). @@ -431,6 +434,14 @@ clean) setup_tmpl ${_pkgname} remove_tmpl_wrksrc $wrksrc ;; +clean-autodeps) + if [ -z "$IN_CHROOT" ]; then + xbps_chroot_handler clean-autodeps dummy + else + pkgver=xbps-src + autoremove_pkg_dependencies + fi + ;; extract|fetch) if [ -z "${_pkgname}" ]; then [ ! -r ./template ] && msg_error "missing build template in $(pwd).\n"