public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: David Seifert <soap@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: David Seifert <soap@gentoo.org>
Subject: [gentoo-dev] [PATCH 17/22] subversion.eclass: remove EAPI 6
Date: Tue, 14 Mar 2023 20:58:21 +0100	[thread overview]
Message-ID: <20230314195826.35239-17-soap@gentoo.org> (raw)
In-Reply-To: <20230314195826.35239-1-soap@gentoo.org>

Signed-off-by: David Seifert <soap@gentoo.org>
---
 eclass/subversion.eclass | 44 ++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
index 349878618427..48ee15105adc 100644
--- a/eclass/subversion.eclass
+++ b/eclass/subversion.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: subversion.eclass
@@ -6,28 +6,26 @@
 # Akinori Hattori <hattya@gentoo.org>
 # @AUTHOR:
 # Original Author: Akinori Hattori <hattya@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
 # @BLURB: Fetch software sources from subversion repositories
 # @DESCRIPTION:
 # The subversion eclass provides functions to fetch software sources
 # from subversion repositories.
 
 case ${EAPI} in
-	6|7|8) inherit estack ;;
-	*) die "${ECLASS}: EAPI ${EAPI:-0} is not supported" ;;
+	7|8) inherit estack ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
+if [[ -z ${_SUBVERSION_ECLASS} ]]; then
+_SUBVERSION_ECLASS=1
+
 PROPERTIES+=" live"
 
-DEPEND="
+BDEPEND="
 	dev-vcs/subversion[http(+)]
 	net-misc/rsync"
 
-case ${EAPI} in
-	6) ;;
-	*) BDEPEND="${DEPEND}"; DEPEND="" ;;
-esac
-
 # @ECLASS_VARIABLE: ESVN_STORE_DIR
 # @USER_VARIABLE
 # @DESCRIPTION:
@@ -177,7 +175,7 @@ subversion_fetch() {
 		die "${ECLASS}: ESVN_REPO_URI (or specified URI) is empty."
 	fi
 
-	[[ -n "${ESVN_REVISION}" ]] && revision="${ESVN_REVISION}"
+	[[ -n ${ESVN_REVISION} ]] && revision="${ESVN_REVISION}"
 
 	# check for the scheme
 	local scheme="${repo_uri%%:*}"
@@ -196,7 +194,7 @@ subversion_fetch() {
 	addread "/etc/subversion"
 	addwrite "${ESVN_STORE_DIR}"
 
-	if [[ -n "${ESVN_UMASK}" ]]; then
+	if [[ -n ${ESVN_UMASK} ]]; then
 		eumask_push "${ESVN_UMASK}"
 	fi
 
@@ -210,9 +208,9 @@ subversion_fetch() {
 	local wc_path="$(subversion__get_wc_path "${repo_uri}")"
 	local options="${ESVN_OPTIONS} --config-dir ${ESVN_STORE_DIR}/.subversion"
 
-	[[ -n "${revision}" ]] && options="${options} -r ${revision}"
+	[[ -n ${revision} ]] && options="${options} -r ${revision}"
 
-	if [[ "${ESVN_OPTIONS}" = *-r* ]]; then
+	if [[ ${ESVN_OPTIONS} == *-r* ]]; then
 		ewarn "\${ESVN_OPTIONS} contains -r, this usage is unsupported. Please"
 		ewarn "see \${ESVN_REPO_URI}"
 	fi
@@ -237,7 +235,7 @@ subversion_fetch() {
 
 		mkdir -m 775 -p "${ESVN_PROJECT}" || die "${ECLASS}: can't mkdir ${ESVN_PROJECT}."
 		cd "${ESVN_PROJECT}" || die "${ECLASS}: can't chdir to ${ESVN_PROJECT}"
-		if [[ -n "${ESVN_USER}" ]]; then
+		if [[ -n ${ESVN_USER} ]]; then
 			${ESVN_FETCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" "${repo_uri}" || die "${ECLASS}: can't fetch to ${wc_path} from ${repo_uri}."
 		else
 			${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ECLASS}: can't fetch to ${wc_path} from ${repo_uri}."
@@ -276,13 +274,13 @@ subversion_fetch() {
 				einfo "     new UUID: $(subversion__svn_info "${repo_uri}" "Repository UUID")"
 				einfo "     repository: ${repo_uri}${revision:+@}${revision}"
 
-				rm -fr "${ESVN_PROJECT}" || die
+				rm -rf "${ESVN_PROJECT}" || die
 
 				debug-print "${FUNCNAME}: ${ESVN_FETCH_CMD} ${options} ${repo_uri}"
 
 				mkdir -m 775 -p "${ESVN_PROJECT}" || die "${ECLASS}: can't mkdir ${ESVN_PROJECT}."
 				cd "${ESVN_PROJECT}" || die "${ECLASS}: can't chdir to ${ESVN_PROJECT}"
-				if [[ -n "${ESVN_USER}" ]]; then
+				if [[ -n ${ESVN_USER} ]]; then
 					${ESVN_FETCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" "${repo_uri}" || die "${ECLASS}: can't fetch to ${wc_path} from ${repo_uri}."
 				else
 					${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ECLASS}: can't fetch to ${wc_path} from ${repo_uri}."
@@ -295,7 +293,7 @@ subversion_fetch() {
 				debug-print "${FUNCNAME}: ${ESVN_SWITCH_CMD} ${options} ${repo_uri}"
 
 				cd "${wc_path}" || die "${ECLASS}: can't chdir to ${wc_path}"
-				if [[ -n "${ESVN_USER}" ]]; then
+				if [[ -n ${ESVN_USER} ]]; then
 					${ESVN_SWITCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" ${repo_uri} || die "${ECLASS}: can't update ${wc_path} from ${repo_uri}."
 				else
 					${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ECLASS}: can't update ${wc_path} from ${repo_uri}."
@@ -308,7 +306,7 @@ subversion_fetch() {
 				debug-print "${FUNCNAME}: ${ESVN_UPDATE_CMD} ${options}"
 
 				cd "${wc_path}" || die "${ECLASS}: can't chdir to ${wc_path}"
-				if [[ -n "${ESVN_USER}" ]]; then
+				if [[ -n ${ESVN_USER} ]]; then
 					${ESVN_UPDATE_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" || die "${ECLASS}: can't update ${wc_path} from ${repo_uri}."
 				else
 					${ESVN_UPDATE_CMD} ${options} || die "${ECLASS}: can't update ${wc_path} from ${repo_uri}."
@@ -320,7 +318,7 @@ subversion_fetch() {
 		fi
 	fi
 
-	if [[ -n "${ESVN_UMASK}" ]]; then
+	if [[ -n ${ESVN_UMASK} ]]; then
 		eumask_pop
 	fi
 
@@ -384,7 +382,7 @@ subversion_src_unpack() {
 subversion_pkg_preinst() {
 	local pkgdate=$(date "+%Y%m%d %H:%M:%S")
 	if [[ -n ${ESCM_LOGDIR} ]]; then
-		local dir="${EROOT%/}${ESCM_LOGDIR}/${CATEGORY}"
+		local dir="${EROOT}${ESCM_LOGDIR}/${CATEGORY}"
 		if [[ ! -d ${dir} ]]; then
 			mkdir -p "${dir}" || eerror "Failed to create '${dir}' for logging svn revision"
 		fi
@@ -450,7 +448,7 @@ subversion__get_peg_revision() {
 
 	debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
 	# repo_uri has peg revision?
-	if [[ ${repo_uri} = *@* ]]; then
+	if [[ ${repo_uri} == *@* ]]; then
 		peg_rev="${repo_uri##*@}"
 		debug-print "${FUNCNAME}: peg_rev = ${peg_rev}"
 	else
@@ -460,4 +458,6 @@ subversion__get_peg_revision() {
 	echo "${peg_rev}"
 }
 
+fi
+
 EXPORT_FUNCTIONS src_unpack pkg_preinst
-- 
2.40.0



  parent reply	other threads:[~2023-03-14 20:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 19:58 [gentoo-dev] [PATCH 01/22] apache-module.eclass: remove EAPI 5 David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 02/22] cron.eclass: add EAPI 8 David Seifert
2023-03-15 11:01   ` Emily
2023-03-15 11:12     ` Ulrich Mueller
2023-03-14 19:58 ` [gentoo-dev] [PATCH 03/22] cron.eclass: remove EAPI 6 David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 04/22] db.eclass: add EAPI allowlist David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 05/22] eapi8-dosym.eclass: remove EAPI 5, 6 David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 06/22] findlib.eclass: remove EAPI 6 David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 07/22] git-r3.eclass: remove EAPI 5 David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 08/22] gnome2.eclass: " David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 09/22] golang-build.eclass: " David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 10/22] golang-vcs-snapshot.eclass: " David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 11/22] golang-vcs.eclass: " David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 12/22] libtool.eclass: " David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 13/22] linux-info.eclass: remove EAPI 0-5 David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 14/22] mono-env.eclass: remove EAPI 5 David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 15/22] office-ext-r1.eclass: " David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 16/22] qmail.eclass: remove EAPI 6 David Seifert
2023-03-14 19:58 ` David Seifert [this message]
2023-03-14 19:58 ` [gentoo-dev] [PATCH 18/22] sword-module.eclass: last-rite David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 19/22] vdr-plugin-2.eclass: remove EAPI 5 David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 20/22] webapp.eclass: " David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 21/22] xdg.eclass: " David Seifert
2023-03-14 19:58 ` [gentoo-dev] [PATCH 22/22] eclass: standardize prologue/epilogue David Seifert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230314195826.35239-17-soap@gentoo.org \
    --to=soap@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox