Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Fri, 17 Mar 2023 22:04:51
Message-Id: 1679090665.18a175df6086cc322280be23e53fc140034774b1.soap@gentoo
1 commit: 18a175df6086cc322280be23e53fc140034774b1
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 17 22:04:25 2023 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 17 22:04:25 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18a175df
7
8 subversion.eclass: remove EAPI 6
9
10 Signed-off-by: David Seifert <soap <AT> gentoo.org>
11
12 eclass/subversion.eclass | 44 ++++++++++++++++++++++----------------------
13 1 file changed, 22 insertions(+), 22 deletions(-)
14
15 diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
16 index 349878618427..48ee15105adc 100644
17 --- a/eclass/subversion.eclass
18 +++ b/eclass/subversion.eclass
19 @@ -1,4 +1,4 @@
20 -# Copyright 1999-2022 Gentoo Authors
21 +# Copyright 1999-2023 Gentoo Authors
22 # Distributed under the terms of the GNU General Public License v2
23
24 # @ECLASS: subversion.eclass
25 @@ -6,28 +6,26 @@
26 # Akinori Hattori <hattya@g.o>
27 # @AUTHOR:
28 # Original Author: Akinori Hattori <hattya@g.o>
29 -# @SUPPORTED_EAPIS: 6 7 8
30 +# @SUPPORTED_EAPIS: 7 8
31 # @BLURB: Fetch software sources from subversion repositories
32 # @DESCRIPTION:
33 # The subversion eclass provides functions to fetch software sources
34 # from subversion repositories.
35
36 case ${EAPI} in
37 - 6|7|8) inherit estack ;;
38 - *) die "${ECLASS}: EAPI ${EAPI:-0} is not supported" ;;
39 + 7|8) inherit estack ;;
40 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
41 esac
42
43 +if [[ -z ${_SUBVERSION_ECLASS} ]]; then
44 +_SUBVERSION_ECLASS=1
45 +
46 PROPERTIES+=" live"
47
48 -DEPEND="
49 +BDEPEND="
50 dev-vcs/subversion[http(+)]
51 net-misc/rsync"
52
53 -case ${EAPI} in
54 - 6) ;;
55 - *) BDEPEND="${DEPEND}"; DEPEND="" ;;
56 -esac
57 -
58 # @ECLASS_VARIABLE: ESVN_STORE_DIR
59 # @USER_VARIABLE
60 # @DESCRIPTION:
61 @@ -177,7 +175,7 @@ subversion_fetch() {
62 die "${ECLASS}: ESVN_REPO_URI (or specified URI) is empty."
63 fi
64
65 - [[ -n "${ESVN_REVISION}" ]] && revision="${ESVN_REVISION}"
66 + [[ -n ${ESVN_REVISION} ]] && revision="${ESVN_REVISION}"
67
68 # check for the scheme
69 local scheme="${repo_uri%%:*}"
70 @@ -196,7 +194,7 @@ subversion_fetch() {
71 addread "/etc/subversion"
72 addwrite "${ESVN_STORE_DIR}"
73
74 - if [[ -n "${ESVN_UMASK}" ]]; then
75 + if [[ -n ${ESVN_UMASK} ]]; then
76 eumask_push "${ESVN_UMASK}"
77 fi
78
79 @@ -210,9 +208,9 @@ subversion_fetch() {
80 local wc_path="$(subversion__get_wc_path "${repo_uri}")"
81 local options="${ESVN_OPTIONS} --config-dir ${ESVN_STORE_DIR}/.subversion"
82
83 - [[ -n "${revision}" ]] && options="${options} -r ${revision}"
84 + [[ -n ${revision} ]] && options="${options} -r ${revision}"
85
86 - if [[ "${ESVN_OPTIONS}" = *-r* ]]; then
87 + if [[ ${ESVN_OPTIONS} == *-r* ]]; then
88 ewarn "\${ESVN_OPTIONS} contains -r, this usage is unsupported. Please"
89 ewarn "see \${ESVN_REPO_URI}"
90 fi
91 @@ -237,7 +235,7 @@ subversion_fetch() {
92
93 mkdir -m 775 -p "${ESVN_PROJECT}" || die "${ECLASS}: can't mkdir ${ESVN_PROJECT}."
94 cd "${ESVN_PROJECT}" || die "${ECLASS}: can't chdir to ${ESVN_PROJECT}"
95 - if [[ -n "${ESVN_USER}" ]]; then
96 + if [[ -n ${ESVN_USER} ]]; then
97 ${ESVN_FETCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" "${repo_uri}" || die "${ECLASS}: can't fetch to ${wc_path} from ${repo_uri}."
98 else
99 ${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ECLASS}: can't fetch to ${wc_path} from ${repo_uri}."
100 @@ -276,13 +274,13 @@ subversion_fetch() {
101 einfo " new UUID: $(subversion__svn_info "${repo_uri}" "Repository UUID")"
102 einfo " repository: ${repo_uri}${revision:+@}${revision}"
103
104 - rm -fr "${ESVN_PROJECT}" || die
105 + rm -rf "${ESVN_PROJECT}" || die
106
107 debug-print "${FUNCNAME}: ${ESVN_FETCH_CMD} ${options} ${repo_uri}"
108
109 mkdir -m 775 -p "${ESVN_PROJECT}" || die "${ECLASS}: can't mkdir ${ESVN_PROJECT}."
110 cd "${ESVN_PROJECT}" || die "${ECLASS}: can't chdir to ${ESVN_PROJECT}"
111 - if [[ -n "${ESVN_USER}" ]]; then
112 + if [[ -n ${ESVN_USER} ]]; then
113 ${ESVN_FETCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" "${repo_uri}" || die "${ECLASS}: can't fetch to ${wc_path} from ${repo_uri}."
114 else
115 ${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ECLASS}: can't fetch to ${wc_path} from ${repo_uri}."
116 @@ -295,7 +293,7 @@ subversion_fetch() {
117 debug-print "${FUNCNAME}: ${ESVN_SWITCH_CMD} ${options} ${repo_uri}"
118
119 cd "${wc_path}" || die "${ECLASS}: can't chdir to ${wc_path}"
120 - if [[ -n "${ESVN_USER}" ]]; then
121 + if [[ -n ${ESVN_USER} ]]; then
122 ${ESVN_SWITCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" ${repo_uri} || die "${ECLASS}: can't update ${wc_path} from ${repo_uri}."
123 else
124 ${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ECLASS}: can't update ${wc_path} from ${repo_uri}."
125 @@ -308,7 +306,7 @@ subversion_fetch() {
126 debug-print "${FUNCNAME}: ${ESVN_UPDATE_CMD} ${options}"
127
128 cd "${wc_path}" || die "${ECLASS}: can't chdir to ${wc_path}"
129 - if [[ -n "${ESVN_USER}" ]]; then
130 + if [[ -n ${ESVN_USER} ]]; then
131 ${ESVN_UPDATE_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" || die "${ECLASS}: can't update ${wc_path} from ${repo_uri}."
132 else
133 ${ESVN_UPDATE_CMD} ${options} || die "${ECLASS}: can't update ${wc_path} from ${repo_uri}."
134 @@ -320,7 +318,7 @@ subversion_fetch() {
135 fi
136 fi
137
138 - if [[ -n "${ESVN_UMASK}" ]]; then
139 + if [[ -n ${ESVN_UMASK} ]]; then
140 eumask_pop
141 fi
142
143 @@ -384,7 +382,7 @@ subversion_src_unpack() {
144 subversion_pkg_preinst() {
145 local pkgdate=$(date "+%Y%m%d %H:%M:%S")
146 if [[ -n ${ESCM_LOGDIR} ]]; then
147 - local dir="${EROOT%/}${ESCM_LOGDIR}/${CATEGORY}"
148 + local dir="${EROOT}${ESCM_LOGDIR}/${CATEGORY}"
149 if [[ ! -d ${dir} ]]; then
150 mkdir -p "${dir}" || eerror "Failed to create '${dir}' for logging svn revision"
151 fi
152 @@ -450,7 +448,7 @@ subversion__get_peg_revision() {
153
154 debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
155 # repo_uri has peg revision?
156 - if [[ ${repo_uri} = *@* ]]; then
157 + if [[ ${repo_uri} == *@* ]]; then
158 peg_rev="${repo_uri##*@}"
159 debug-print "${FUNCNAME}: peg_rev = ${peg_rev}"
160 else
161 @@ -460,4 +458,6 @@ subversion__get_peg_revision() {
162 echo "${peg_rev}"
163 }
164
165 +fi
166 +
167 EXPORT_FUNCTIONS src_unpack pkg_preinst