Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: metadata/, eclass/
Date: Sun, 25 Jul 2021 01:29:23
Message-Id: 1627176485.29695b78d05c622d936ca393fba23f53542dbaf5.sam@gentoo
1 commit: 29695b78d05c622d936ca393fba23f53542dbaf5
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 25 01:27:34 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 25 01:28:05 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29695b78
7
8 darcs.eclass: remove last-rited eclass
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 eclass/darcs.eclass | 226 ------------------------------------------------
13 metadata/qa-policy.conf | 1 -
14 2 files changed, 227 deletions(-)
15
16 diff --git a/eclass/darcs.eclass b/eclass/darcs.eclass
17 deleted file mode 100644
18 index 92bd347cc5a..00000000000
19 --- a/eclass/darcs.eclass
20 +++ /dev/null
21 @@ -1,226 +0,0 @@
22 -# Copyright 1999-2021 Gentoo Authors
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -# @DEAD
26 -# No consumers left. Removal in 30 days.
27 -
28 -# @ECLASS: darcs.eclass
29 -# @MAINTAINER:
30 -# "Gentoo's Haskell Language team" <haskell@g.o>
31 -# Sergei Trofimovich <slyfox@g.o>
32 -# @AUTHOR:
33 -# Original Author: Jeffrey Yasskin <jyasskin@×××××××××××.edu>
34 -# <rphillips@g.o> (tla eclass author)
35 -# Andres Loeh <kosmikus@g.o> (darcs.eclass author)
36 -# Alexander Vershilov <alexander.vershilov@×××××.com> (various contributions)
37 -# @BLURB: This eclass provides functions for fetch and unpack darcs repositories
38 -# @DEPRECATED: none
39 -# @DESCRIPTION:
40 -# This eclass provides the generic darcs fetching functions.
41 -#
42 -# Define the EDARCS_REPOSITORY variable at least.
43 -# The ${S} variable is set to ${WORKDIR}/${P}.
44 -
45 -# TODO:
46 -
47 -# support for tags
48 -
49 -# eshopts_{push,pop}
50 -case "${EAPI:-0}" in
51 - 4|5|6) inherit eutils ;;
52 - 7) inherit estack ;;
53 - *) ;;
54 -esac
55 -
56 -# Don't download anything other than the darcs repository
57 -SRC_URI=""
58 -
59 -# You shouldn't change these settings yourself! The ebuild/eclass inheriting
60 -# this eclass will take care of that.
61 -
62 -# --- begin ebuild-configurable settings
63 -
64 -# darcs command to run
65 -# @ECLASS-VARIABLE: EDARCS_DARCS_CMD
66 -# @DESCRIPTION:
67 -# Path to darcs binary.
68 -: ${EDARCS_DARCS_CMD:=darcs}
69 -
70 -# darcs commands with command-specific options
71 -
72 -# @ECLASS-VARIABLE: EDARCS_GET_CMD
73 -# @DESCRIPTION:
74 -# First fetch darcs command.
75 -: ${EDARCS_GET_CMD:=get --lazy}
76 -
77 -# @ECLASS-VARIABLE: EDARCS_UPDATE_CMD
78 -# @DESCRIPTION:
79 -# Repo update darcs command.
80 -: ${EDARCS_UPDATE_CMD:=pull}
81 -
82 -# @ECLASS-VARIABLE: EDARCS_OPTIONS
83 -# @DESCRIPTION:
84 -# Options to pass to both the "get" and "update" commands
85 -: ${EDARCS_OPTIONS:=--set-scripts-executable}
86 -
87 -# @ECLASS-VARIABLE: EDARCS_TOP_DIR
88 -# @DESCRIPTION:
89 -# Where the darcs repositories are stored/accessed
90 -: ${EDARCS_TOP_DIR:=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/darcs-src}
91 -
92 -# @ECLASS-VARIABLE: EDARCS_REPOSITORY
93 -# @DESCRIPTION:
94 -# The URI to the repository.
95 -: ${EDARCS_REPOSITORY:=}
96 -
97 -# @ECLASS-VARIABLE: EDARCS_OFFLINE
98 -# @USER_VARIABLE
99 -# @DESCRIPTION:
100 -# Set this variable to a non-empty value to disable the automatic updating of
101 -# a darcs repository. This is intended to be set outside the darcs source
102 -# tree by users. Defaults to EVCS_OFFLINE value.
103 -: ${EDARCS_OFFLINE:=${EVCS_OFFLINE}}
104 -
105 -# @ECLASS-VARIABLE: EDARCS_CLEAN
106 -# @DESCRIPTION:
107 -# Set this to something to get a clean copy when updating
108 -# (removes the working directory, then uses EDARCS_GET_CMD to
109 -# re-download it.)
110 -: ${EDARCS_CLEAN:=}
111 -
112 -# --- end ebuild-configurable settings ---
113 -
114 -PROPERTIES+=" live"
115 -
116 -case ${EAPI:-0} in
117 - [0-6]) # no need to care about 5-HDEPEND and similar
118 - DEPEND="dev-vcs/darcs
119 - net-misc/rsync"
120 - ;;
121 - *)
122 - BDEPEND="dev-vcs/darcs
123 - net-misc/rsync"
124 - ;;
125 -esac
126 -
127 -# @FUNCTION: darcs_patchcount
128 -# @INTERNAL
129 -# @DESCRIPTION:
130 -# Internal function to determine amount of patches in repository.
131 -darcs_patchcount() {
132 - set -- $(HOME="${EDARCS_TOP_DIR}" ${EDARCS_DARCS_CMD} show repo --repodir="${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}" | grep "Num Patches")
133 - # handle string like: " Num Patches: 3860"
134 - echo ${3}
135 -}
136 -
137 -# @FUNCTION: darcs_fetch
138 -# @INTERNAL
139 -# @DESCRIPTION:
140 -# Internal function is called from darcs_src_unpack
141 -darcs_fetch() {
142 - # The local directory to store the repository (useful to ensure a
143 - # unique local name); relative to EDARCS_TOP_DIR
144 - [[ -z ${EDARCS_LOCALREPO} ]] && [[ -n ${EDARCS_REPOSITORY} ]] \
145 - && EDARCS_LOCALREPO=${EDARCS_REPOSITORY%/} \
146 - && EDARCS_LOCALREPO=${EDARCS_LOCALREPO##*/}
147 -
148 - debug-print-function ${FUNCNAME} $*
149 -
150 - if [[ -n ${EDARCS_CLEAN} ]]; then
151 - addwrite "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}"
152 - rm -rf "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}"
153 - fi
154 -
155 - # create the top dir if needed
156 - if [[ ! -d ${EDARCS_TOP_DIR} ]]; then
157 - # note that the addwrite statements in this block are only there to allow creating EDARCS_TOP_DIR;
158 - # we've already allowed writing inside it
159 - # this is because it's simpler than trying to find out the parent path of the directory, which
160 - # would need to be the real path and not a symlink for things to work (so we can't just remove
161 - # the last path element in the string)
162 - debug-print "${FUNCNAME}: checkout mode. creating darcs directory"
163 - addwrite /foobar
164 - addwrite /
165 - mkdir -p "${EDARCS_TOP_DIR}"
166 - export SANDBOX_WRITE="${SANDBOX_WRITE//:\/foobar:\/}"
167 - fi
168 -
169 - # in case EDARCS_DARCS_DIR is a symlink to a dir, get the real
170 - # dir's path, otherwise addwrite() doesn't work.
171 - pushd . || die
172 - cd -P "${EDARCS_TOP_DIR}" > /dev/null
173 - EDARCS_TOP_DIR="`/bin/pwd`"
174 -
175 - # disable the sandbox for this dir
176 - addwrite "${EDARCS_TOP_DIR}"
177 -
178 - # determine checkout or update mode and change to the right directory.
179 - if [[ ! -d "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}/_darcs" ]]; then
180 - mode=get
181 - cd "${EDARCS_TOP_DIR}"
182 - else
183 - mode=update
184 - cd "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}"
185 - fi
186 -
187 - # commands to run
188 - local cmdget="${EDARCS_DARCS_CMD} ${EDARCS_GET_CMD} ${EDARCS_OPTIONS} --repo-name=${EDARCS_LOCALREPO} ${EDARCS_REPOSITORY}"
189 - local cmdupdate="${EDARCS_DARCS_CMD} ${EDARCS_UPDATE_CMD} --all ${EDARCS_OPTIONS} ${EDARCS_REPOSITORY}"
190 -
191 - if [[ ${mode} == "get" ]]; then
192 - einfo "Running ${cmdget}"
193 - HOME="${EDARCS_TOP_DIR}" ${cmdget} || die "darcs get command failed"
194 - elif [[ -n ${EDARCS_OFFLINE} ]] ; then
195 - einfo "Offline update"
196 - elif [[ ${mode} == "update" ]]; then
197 - einfo "Running ${cmdupdate}"
198 - HOME="${EDARCS_TOP_DIR}" ${cmdupdate} || die "darcs update command failed"
199 - fi
200 -
201 - export EDARCS_PATCHCOUNT=$(darcs_patchcount)
202 - einfo " patches in repo: ${EDARCS_PATCHCOUNT}"
203 -
204 - popd || die
205 -}
206 -
207 -# @FUNCTION: darcs_src_unpack
208 -# @DESCRIPTION:
209 -# src_upack function
210 -darcs_src_unpack() {
211 - # The local directory to store the repository (useful to ensure a
212 - # unique local name); relative to EDARCS_TOP_DIR
213 - [[ -z ${EDARCS_LOCALREPO} ]] && [[ -n ${EDARCS_REPOSITORY} ]] \
214 - && EDARCS_LOCALREPO=${EDARCS_REPOSITORY%/} \
215 - && EDARCS_LOCALREPO=${EDARCS_LOCALREPO##*/}
216 -
217 - debug-print-function ${FUNCNAME} $*
218 -
219 - debug-print "${FUNCNAME}: init:
220 - EDARCS_DARCS_CMD=${EDARCS_DARCS_CMD}
221 - EDARCS_GET_CMD=${EDARCS_GET_CMD}
222 - EDARCS_UPDATE_CMD=${EDARCS_UPDATE_CMD}
223 - EDARCS_OPTIONS=${EDARCS_OPTIONS}
224 - EDARCS_TOP_DIR=${EDARCS_TOP_DIR}
225 - EDARCS_REPOSITORY=${EDARCS_REPOSITORY}
226 - EDARCS_LOCALREPO=${EDARCS_LOCALREPO}
227 - EDARCS_CLEAN=${EDARCS_CLEAN}"
228 -
229 - einfo "Fetching darcs repository ${EDARCS_REPOSITORY} into ${EDARCS_TOP_DIR}..."
230 - darcs_fetch
231 -
232 - einfo "Copying ${EDARCS_LOCALREPO} from ${EDARCS_TOP_DIR}..."
233 - debug-print "Copying ${EDARCS_LOCALREPO} from ${EDARCS_TOP_DIR}..."
234 -
235 - # probably redundant, but best to make sure
236 - # Use ${WORKDIR}/${P} rather than ${S} so user can point ${S} to something inside.
237 - mkdir -p "${WORKDIR}/${P}"
238 -
239 - eshopts_push -s dotglob # get any dotfiles too.
240 - rsync -rlpgo "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}"/* "${WORKDIR}/${P}"
241 - eshopts_pop
242 -
243 - einfo "Darcs repository contents are now in ${WORKDIR}/${P}"
244 -
245 -}
246 -
247 -EXPORT_FUNCTIONS src_unpack
248
249 diff --git a/metadata/qa-policy.conf b/metadata/qa-policy.conf
250 index cc9d0674f3b..c8cfc906730 100644
251 --- a/metadata/qa-policy.conf
252 +++ b/metadata/qa-policy.conf
253 @@ -68,7 +68,6 @@ PG1001 = warning
254 # replacement eclass names, though free-form text is permitted.
255 [deprecated-eclass]
256 cmake-utils = cmake
257 -darcs = (none)
258 epatch = (eapply since EAPI 6)
259 eutils = (split into several eclasses)
260 l10n = plocale