From c39bfbc7136f275b989595d86e18a05ec231a439 Mon Sep 17 00:00:00 2001 From: Mark Ferrell Date: Wed, 16 Apr 2014 09:04:34 -0700 Subject: Rewrite make-distclean as a wrapper to make-clean --- libexec/build-make-clean | 2 +- libexec/build-make-distclean | 28 +++++----------------------- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/libexec/build-make-clean b/libexec/build-make-clean index 8c5834d..285d80e 100755 --- a/libexec/build-make-clean +++ b/libexec/build-make-clean @@ -5,7 +5,6 @@ build_make_clean() load_rules "${1}" if [ -z "${NOCLEAN}" ]; then - echo "cleaning: ${1}" if [ -f "${BUILDER_ATFDIR}/${CATEGORY}/${NAME}-${VERSION}-${RELEASE}.${ARCHIVE_FORMAT}" ]; then rm "${BUILDER_ATFDIR}/${CATEGORY}/${NAME}-${VERSION}-${RELEASE}.${ARCHIVE_FORMAT}" & fi @@ -30,6 +29,7 @@ build_make_clean() if test "${BUILDER_CALL_STACK}" = '__main__'; then simple_usage 'clean' '[all|[/]]' "$@" + echo "cleaning: ${1}" build_make_clean "${@}" fi diff --git a/libexec/build-make-distclean b/libexec/build-make-distclean index f3cc91a..2be17a8 100755 --- a/libexec/build-make-distclean +++ b/libexec/build-make-distclean @@ -2,33 +2,15 @@ build_make_distclean() {( - echo "distcleaning: ${1}" - load_rules "${1}" - - if [ -f "${BUILDER_ATFDIR}/${CATEGORY}/${NAME}-${VERSION}-${RELEASE}.${ARCHIVE_FORMAT}" ]; then - rm "${BUILDER_ATFDIR}/${CATEGORY}/${NAME}-${VERSION}-${RELEASE}.${ARCHIVE_FORMAT}" & - fi - if [ -f "${SYSROOT}/var/db/binpkgs/${CATEGORY}/${NAME}" ]; then - cd "${SYSROOT}" - # FIXME: we are failing to handle file collisions produce in - # this file. - cat "var/db/binpkgs/${CATEGORY}/${NAME}" | xargs -0 rm -f & - fi - - if [ -d "${BUILDER_TMPDIR}/${CATEGORY}/${NAME}" ]; then - rm -rf "${BUILDER_TMPDIR}/${CATEGORY}/${NAME}" & - fi - - wait - - # Clobber our package marker. - if [ -f "${SYSROOT}/var/db/binpkgs/${CATEGORY}/${NAME}" ]; then - rm "${SYSROOT}/var/db/binpkgs/${CATEGORY}/${NAME}" - fi + import build-make-clean + unset NOCLEAN + export NOCLEAN + build_make_clean "${1}" )} if test "${BUILDER_CALL_STACK}" = '__main__'; then simple_usage 'distclean' '[all|[/]]' "$@" + echo "distcleaning: ${1}" build_make_distclean "${@}" fi -- cgit v1.2.3-18-g5258