From d410c427d4ffe6729b19fce581bea687faefc620 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Dec 2021 10:57:55 +0100 Subject: [PATCH] eclass/vcs-clean: Sync with gentoo It's from gentoo commit 649d76b85a8dfd316c6416c0bb44b9ea4e16f11a. --- .../portage-stable/eclass/vcs-clean.eclass | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/vcs-clean.eclass b/sdk_container/src/third_party/portage-stable/eclass/vcs-clean.eclass index 649a9e3039..89f6b73218 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/vcs-clean.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/vcs-clean.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: vcs-clean.eclass @@ -6,8 +6,17 @@ # base-system@gentoo.org # @AUTHOR: # Benedikt Böhm +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: helper functions to remove VCS directories +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_VCS_CLEAN_ECLASS} ]] ; then +_VCS_CLEAN_ECLASS=1 + # @FUNCTION: ecvs_clean # @USAGE: [list of dirs] # @DESCRIPTION: @@ -38,3 +47,5 @@ egit_clean() { [[ $# -eq 0 ]] && set -- . find "$@" -type d -name '.git*' -prune -exec rm -rf '{}' + } + +fi