Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/
Date: Sat, 05 Aug 2017 19:48:36
Message-Id: 1501962504.9fa65eeb3a982ce4afe2f3ebba564edfd4e5f28d.zmedico@gentoo
1 commit: 9fa65eeb3a982ce4afe2f3ebba564edfd4e5f28d
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 5 19:47:28 2017 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 5 19:48:24 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fa65eeb
7
8 sys-apps/portage: remove old versions
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 sys-apps/portage/Manifest | 4 -
13 sys-apps/portage/portage-2.2.28.ebuild | 366 ---------------------------------
14 sys-apps/portage/portage-2.3.0.ebuild | 364 --------------------------------
15 sys-apps/portage/portage-2.3.3.ebuild | 277 -------------------------
16 sys-apps/portage/portage-2.3.4.ebuild | 277 -------------------------
17 5 files changed, 1288 deletions(-)
18
19 diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
20 index bb0d7a0856d..6b411620c57 100644
21 --- a/sys-apps/portage/Manifest
22 +++ b/sys-apps/portage/Manifest
23 @@ -1,6 +1,2 @@
24 -DIST portage-2.2.28.tar.bz2 969138 SHA256 da8148a1a9275c87f535679e41b1bb3a1380ba0f903b80510017517e4c5229d0 SHA512 d21bf7e7dcc0a779a13df6a959e5d4291492fce2a5525b67e9a4705888021f9c08b8d78cd32b2eb930ac5428c40383e4e46da5a7b1ed5c9c9c42314c0f1c6a0b WHIRLPOOL 1b9584b0243b46c70d0778aad57df2d3ea99e19f243280e542c29e6fed0634b72de6b203a3c296c2977d1a6e5e5250b910574176c692d2c7c27c0938528bb43d
25 -DIST portage-2.3.0.tar.bz2 907500 SHA256 1fbed03f78587c80f5afd36b57d7ac085ed5e5b2cc19fea63fc8a43a477e4067 SHA512 85d15a234e446677dc3458de8dacaa0d91164b190c59f8002ff98dc27a9ad699cba6c4f871ac785ba6116ed53f1f3530ec3ed662ce7f4b3e8c49380b4b206074 WHIRLPOOL 979a7fc61a65dca790a077d4839fbbb22fc8ef31ccbe534b12b87c699a25a1930586dd6ddfb9013d57a71c03ed8d976612ea15e9dc3541aff0b67e3d604a5be2
26 -DIST portage-2.3.3.tar.bz2 920984 SHA256 beec3923e14fb98d9992ede0b7718df594c50f366c3e58c2f0ba10102e77271f SHA512 7dec90a980ce6bb1266bb9c9c9979bc6cb8bdb4f37d8908c78cddf053979aef44424be86ea1fe16a072f6ed21b26233df84f6dd22d6f0c9435816090c675b53c WHIRLPOOL cc4a7e63b797766cc99ab712902b96e38fe22a482d7eeb3e29843a6070f6601b8bbe9c435b0a9c3cc1947e49c23291f1064f3d01c010d822dcb2686a103b4c3d
27 -DIST portage-2.3.4.tar.bz2 917183 SHA256 e773c7c675e5e29213fc0431bb7e624677bed34367c9ac656623225fdfab97b8 SHA512 ac658d8e0c3045b470efd990a088f3fc39cbdce6715299af8b111e911df90a5dc7c2b0a4fbb8403ac4608f361e853a843a8c15197e84c4cadaadb52cc6a9f3d8 WHIRLPOOL 0afca1fb4ab7a049f43a77df6bb4f08a830a21fec664adc62fe6e5990fff5bd12ef7eb381c5e46c0872c4db2afd1fd4aa54b9ff8fdc4d81348683e17147e7c7a
28 DIST portage-2.3.5.tar.bz2 933047 SHA256 9b3282eee8f7f5728a4a71864d6b34315d71d43c52b2b650cf0d8f412c871941 SHA512 c403578caf40d97e8081c203d433b515cb2fdb14cb8b7d2652ed664bd079e65db32b54ce12ff495af6dd5fb468c5a1ef58d335e202ede5355d115049e21a6a35 WHIRLPOOL 25dbb6547d6488cebc1baf093a600e2034e17558306fd55f5502346330a78012e32d3c49dcf0445664c69d4e3e6b2580762417324ccd0bf3aa08575245165a24
29 DIST portage-2.3.6.tar.bz2 943085 SHA256 2f57545fcb142a4b23c2052c523d3d858754b232be21455ee6c6cd3ff0903cc2 SHA512 5bcfb678c1ea0cd97a983ee7520c9ecabd07d5bb0fd01c70b74fd7b6ce478f4a109aac84d40b82426719ca7c9ee6aed3affb3b9754045e62b4c664ae113cf055 WHIRLPOOL d0258c579597690e8bf2cc2a3ecc36d543e67a728c302a9b16ae361086023a7e059ac1a9e2e64f026b7d975d6b619d3b981062227042098ed3afc1b86658b636
30
31 diff --git a/sys-apps/portage/portage-2.2.28.ebuild b/sys-apps/portage/portage-2.2.28.ebuild
32 deleted file mode 100644
33 index 7251192714a..00000000000
34 --- a/sys-apps/portage/portage-2.2.28.ebuild
35 +++ /dev/null
36 @@ -1,366 +0,0 @@
37 -# Copyright 1999-2016 Gentoo Foundation
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -EAPI=5
41 -
42 -PYTHON_COMPAT=(
43 - pypy
44 - python3_3 python3_4 python3_5
45 - python2_7
46 -)
47 -PYTHON_REQ_USE='bzip2(+)'
48 -
49 -inherit distutils-r1 multilib
50 -
51 -DESCRIPTION="Portage is the package management and distribution system for Gentoo"
52 -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
53 -
54 -LICENSE="GPL-2"
55 -KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
56 -SLOT="0"
57 -IUSE="build doc epydoc +ipc linguas_ru selinux xattr"
58 -
59 -DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
60 - >=app-arch/tar-1.27
61 - dev-lang/python-exec:2
62 - >=sys-apps/sed-4.0.5 sys-devel/patch
63 - doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
64 - epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
65 -# Require sandbox-2.2 for bug #288863.
66 -# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
67 -# quite slow, so it's not considered in the dependencies as an alternative to
68 -# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
69 -# for now, don't pull in xattr deps for other kernels.
70 -# For whirlpool hash, require python[ssl] (bug #425046).
71 -# For compgen, require bash[readline] (bug #445576).
72 -RDEPEND="
73 - >=app-arch/tar-1.27
74 - dev-lang/python-exec:2
75 - !build? (
76 - >=sys-apps/sed-4.0.5
77 - app-shells/bash:0[readline]
78 - >=app-admin/eselect-1.2
79 - )
80 - elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
81 - elibc_glibc? ( >=sys-apps/sandbox-2.2 )
82 - elibc_musl? ( >=sys-apps/sandbox-2.2 )
83 - elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
84 - >=app-misc/pax-utils-0.1.17
85 - selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
86 - xattr? ( kernel_linux? (
87 - >=sys-apps/install-xattr-0.3
88 - $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
89 - python2_7 pypy)
90 - ) )
91 - !<app-admin/logrotate-3.8.0"
92 -PDEPEND="
93 - !build? (
94 - >=net-misc/rsync-2.6.4
95 - userland_GNU? ( >=sys-apps/coreutils-6.4 )
96 - )"
97 -# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
98 -# NOTE: FEATURES=installsources requires debugedit and rsync
99 -
100 -REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
101 -
102 -SRC_ARCHIVES="https://dev.gentoo.org/~dolsen/releases/portage"
103 -
104 -prefix_src_archives() {
105 - local x y
106 - for x in ${@}; do
107 - for y in ${SRC_ARCHIVES}; do
108 - echo ${y}/${x}
109 - done
110 - done
111 -}
112 -
113 -TARBALL_PV=${PV}
114 -SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
115 - $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
116 -
117 -pkg_setup() {
118 - use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
119 -}
120 -
121 -python_prepare_all() {
122 - distutils-r1_python_prepare_all
123 -
124 - if ! use ipc ; then
125 - einfo "Disabling ipc..."
126 - sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
127 - -i pym/_emerge/AbstractEbuildProcess.py || \
128 - die "failed to patch AbstractEbuildProcess.py"
129 - fi
130 -
131 - if use xattr && use kernel_linux ; then
132 - einfo "Adding FEATURES=xattr to make.globals ..."
133 - echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
134 - || die "failed to append to make.globals"
135 - fi
136 -
137 - if [[ -n ${EPREFIX} ]] ; then
138 - einfo "Setting portage.const.EPREFIX ..."
139 - sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
140 - -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
141 - -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
142 - -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
143 - -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
144 - -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
145 - -i pym/portage/const.py || \
146 - die "Failed to patch portage.const.EPREFIX"
147 -
148 - einfo "Prefixing shebangs ..."
149 - while read -r -d $'\0' ; do
150 - local shebang=$(head -n1 "$REPLY")
151 - if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
152 - sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
153 - die "sed failed"
154 - fi
155 - done < <(find . -type f -print0)
156 -
157 - einfo "Adjusting make.globals ..."
158 - sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
159 - -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
160 - -i cnf/make.globals || die "sed failed"
161 -
162 - einfo "Adjusting repos.conf ..."
163 - sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
164 - -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
165 - -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
166 - -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
167 - -i cnf/repos.conf || die "sed failed"
168 -
169 - einfo "Adding FEATURES=force-prefix to make.globals ..."
170 - echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
171 - || die "failed to append to make.globals"
172 - fi
173 -
174 - cd "${S}/cnf" || die
175 - if [ -f "make.conf.example.${ARCH}".diff ]; then
176 - patch make.conf.example "make.conf.example.${ARCH}".diff || \
177 - die "Failed to patch make.conf.example"
178 - else
179 - eerror ""
180 - eerror "Portage does not have an arch-specific configuration for this arch."
181 - eerror "Please notify the arch maintainer about this issue. Using generic."
182 - eerror ""
183 - fi
184 -}
185 -
186 -python_compile_all() {
187 - local targets=()
188 - use doc && targets+=( docbook )
189 - use epydoc && targets+=( epydoc )
190 -
191 - if [[ ${targets[@]} ]]; then
192 - esetup.py "${targets[@]}"
193 - fi
194 -}
195 -
196 -python_test() {
197 - esetup.py test
198 -}
199 -
200 -python_install() {
201 - # Install sbin scripts to bindir for python-exec linking
202 - # they will be relocated in pkg_preinst()
203 - distutils-r1_python_install \
204 - --system-prefix="${EPREFIX}/usr" \
205 - --bindir="$(python_get_scriptdir)" \
206 - --docdir="${EPREFIX}/usr/share/doc/${PF}" \
207 - --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
208 - --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
209 - --sbindir="$(python_get_scriptdir)" \
210 - --sysconfdir="${EPREFIX}/etc" \
211 - "${@}"
212 -}
213 -
214 -python_install_all() {
215 - distutils-r1_python_install_all
216 -
217 - local targets=()
218 - use doc && targets+=( install_docbook )
219 - use epydoc && targets+=( install_epydoc )
220 -
221 - # install docs
222 - if [[ ${targets[@]} ]]; then
223 - esetup.py "${targets[@]}"
224 - fi
225 -
226 - # Due to distutils/python-exec limitations
227 - # these must be installed to /usr/bin.
228 - local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
229 - einfo "Moving admin scripts to the correct directory"
230 - dodir /usr/sbin
231 - for target in ${sbin_relocations}; do
232 - einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
233 - mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
234 - done
235 -}
236 -
237 -pkg_preinst() {
238 - # comment out sanity test until it is fixed to work
239 - # with the new PORTAGE_PYM_PATH
240 - #if [[ $ROOT == / ]] ; then
241 - ## Run some minimal tests as a sanity check.
242 - #local test_runner=$(find "${ED}" -name runTests)
243 - #if [[ -n $test_runner && -x $test_runner ]] ; then
244 - #einfo "Running preinst sanity tests..."
245 - #"$test_runner" || die "preinst sanity tests failed"
246 - #fi
247 - #fi
248 -
249 - # elog dir must exist to avoid logrotate error for bug #415911.
250 - # This code runs in preinst in order to bypass the mapping of
251 - # portage:portage to root:root which happens after src_install.
252 - keepdir /var/log/portage/elog
253 - # This is allowed to fail if the user/group are invalid for prefix users.
254 - if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
255 - chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
256 - fi
257 -
258 - if has_version "<${CATEGORY}/${PN}-2.1.13" || \
259 - {
260 - has_version ">=${CATEGORY}/${PN}-2.2_rc0" && \
261 - has_version "<${CATEGORY}/${PN}-2.2.0_alpha189"
262 - } ; then
263 - USERPRIV_UPGRADE=true
264 - USERSYNC_UPGRADE=true
265 - REPOS_CONF_UPGRADE=true
266 - REPOS_CONF_SYNC=
267 - type -P portageq >/dev/null 2>&1 && \
268 - REPOS_CONF_SYNC=$("$(type -P portageq)" envvar SYNC)
269 - else
270 - USERPRIV_UPGRADE=false
271 - USERSYNC_UPGRADE=false
272 - REPOS_CONF_UPGRADE=false
273 - fi
274 -}
275 -
276 -get_ownership() {
277 - case ${USERLAND} in
278 - BSD)
279 - stat -f '%Su:%Sg' "${1}"
280 - ;;
281 - *)
282 - stat -c '%U:%G' "${1}"
283 - ;;
284 - esac
285 -}
286 -
287 -new_config_protect() {
288 - # Generate a ._cfg file even if the target file
289 - # does not exist, ensuring that the user will
290 - # notice the config change.
291 - local basename=${1##*/}
292 - local dirname=${1%/*}
293 - local i=0
294 - while true ; do
295 - local filename=$(
296 - echo -n "${dirname}/._cfg"
297 - printf "%04d" ${i}
298 - echo -n "_${basename}"
299 - )
300 - [[ -e ${filename} ]] || break
301 - (( i++ ))
302 - done
303 - echo "${filename}"
304 -}
305 -
306 -pkg_postinst() {
307 -
308 - if ${REPOS_CONF_UPGRADE} ; then
309 - einfo "Generating repos.conf"
310 - local repo_name=
311 - [[ -f ${PORTDIR}/profiles/repo_name ]] && \
312 - repo_name=$(< "${PORTDIR}/profiles/repo_name")
313 - if [[ -z ${REPOS_CONF_SYNC} ]] ; then
314 - REPOS_CONF_SYNC=$(grep "^sync-uri =" "${EROOT:-${ROOT}}usr/share/portage/config/repos.conf")
315 - REPOS_CONF_SYNC=${REPOS_CONF_SYNC##* }
316 - fi
317 - local sync_type=
318 - [[ ${REPOS_CONF_SYNC} == git://* ]] && sync_type=git
319 -
320 - if [[ ${REPOS_CONF_SYNC} == cvs://* ]]; then
321 - sync_type=cvs
322 - REPOS_CONF_SYNC=${REPOS_CONF_SYNC#cvs://}
323 - fi
324 -
325 - cat <<-EOF > "${T}/repos.conf"
326 - [DEFAULT]
327 - main-repo = ${repo_name:-gentoo}
328 -
329 - [${repo_name:-gentoo}]
330 - location = ${PORTDIR:-${EPREFIX}/usr/portage}
331 - sync-type = ${sync_type:-rsync}
332 - sync-uri = ${REPOS_CONF_SYNC}
333 - EOF
334 -
335 - [[ ${sync_type} == cvs ]] && echo "sync-cvs-repo = $(<"${PORTDIR}/CVS/Repository")" >> "${T}/repos.conf"
336 -
337 - local dest=${EROOT:-${ROOT}}etc/portage/repos.conf
338 - if [[ ! -f ${dest} ]] && mkdir -p "${dest}" 2>/dev/null ; then
339 - dest=${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf
340 - fi
341 - # Don't install the config update if the desired repos.conf directory
342 - # and config file exist, since users may accept it blindly and break
343 - # their config (bug #478726).
344 - [[ -e ${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf ]] || \
345 - mv "${T}/repos.conf" "$(new_config_protect "${dest}")"
346 -
347 - if [[ ${PORTDIR} == ${EPREFIX}/usr/portage ]] ; then
348 - einfo "Generating make.conf PORTDIR setting for backward compatibility"
349 - for dest in "${EROOT:-${ROOT}}etc/make.conf" "${EROOT:-${ROOT}}etc/portage/make.conf" ; do
350 - [[ -e ${dest} ]] && break
351 - done
352 - [[ -d ${dest} ]] && dest=${dest}/portdir.conf
353 - rm -rf "${T}/make.conf"
354 - [[ -f ${dest} ]] && cat "${dest}" > "${T}/make.conf"
355 - cat <<-EOF >> "${T}/make.conf"
356 -
357 - # Set PORTDIR for backward compatibility with various tools:
358 - # gentoo-bashcomp - bug #478444
359 - # euse - bug #474574
360 - # euses and ufed - bug #478318
361 - PORTDIR="${EPREFIX}/usr/portage"
362 - EOF
363 - mkdir -p "${dest%/*}"
364 - mv "${T}/make.conf" "$(new_config_protect "${dest}")"
365 - fi
366 - fi
367 -
368 - local distdir=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}
369 -
370 - if ${USERSYNC_UPGRADE} && \
371 - [[ -d ${PORTDIR} && -w ${PORTDIR} ]] ; then
372 - local ownership=$(get_ownership "${PORTDIR}")
373 - if [[ -n ${ownership} ]] ; then
374 - einfo "Adjusting PORTDIR permissions for usersync"
375 - find "${PORTDIR}" -path "${distdir%/}" -prune -o \
376 - ! \( -user "${ownership%:*}" -a -group "${ownership#*:}" \) \
377 - -exec chown "${ownership}" {} +
378 - fi
379 - fi
380 -
381 - # Do this last, since it could take a long time if there
382 - # are lots of live sources, and the user may be tempted
383 - # to kill emerge while it is running.
384 - if ${USERPRIV_UPGRADE} && \
385 - [[ -d ${distdir} && -w ${distdir} ]] ; then
386 - local ownership=$(get_ownership "${distdir}")
387 - if [[ ${ownership#*:} == portage ]] ; then
388 - einfo "Adjusting DISTDIR permissions for userpriv"
389 - find "${distdir}" -mindepth 1 -maxdepth 1 -type d -uid 0 \
390 - -exec chown -R portage:portage {} +
391 - fi
392 - fi
393 -
394 - einfo ""
395 - einfo "This release of portage contains the new repoman code base"
396 - einfo "This code base is still being developed. So its API's are"
397 - einfo "not to be considered stable and are subject to change."
398 - einfo "The code released has been tested and considered ready for use."
399 - einfo "This however does not guarantee it to be completely bug free."
400 - einfo "Please report any bugs you may encounter."
401 - einfo ""
402 -}
403
404 diff --git a/sys-apps/portage/portage-2.3.0.ebuild b/sys-apps/portage/portage-2.3.0.ebuild
405 deleted file mode 100644
406 index aeee63f60e8..00000000000
407 --- a/sys-apps/portage/portage-2.3.0.ebuild
408 +++ /dev/null
409 @@ -1,364 +0,0 @@
410 -# Copyright 1999-2016 Gentoo Foundation
411 -# Distributed under the terms of the GNU General Public License v2
412 -
413 -EAPI=5
414 -
415 -PYTHON_COMPAT=(
416 - pypy
417 - python3_3 python3_4 python3_5
418 - python2_7
419 -)
420 -PYTHON_REQ_USE='bzip2(+)'
421 -
422 -inherit distutils-r1 multilib
423 -
424 -DESCRIPTION="Portage is the package management and distribution system for Gentoo"
425 -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
426 -
427 -LICENSE="GPL-2"
428 -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
429 -SLOT="0"
430 -IUSE="build doc epydoc +ipc linguas_ru selinux xattr"
431 -
432 -DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
433 - >=app-arch/tar-1.27
434 - dev-lang/python-exec:2
435 - >=sys-apps/sed-4.0.5 sys-devel/patch
436 - doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
437 - epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
438 -# Require sandbox-2.2 for bug #288863.
439 -# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
440 -# quite slow, so it's not considered in the dependencies as an alternative to
441 -# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
442 -# for now, don't pull in xattr deps for other kernels.
443 -# For whirlpool hash, require python[ssl] (bug #425046).
444 -# For compgen, require bash[readline] (bug #445576).
445 -RDEPEND="
446 - >=app-arch/tar-1.27
447 - dev-lang/python-exec:2
448 - !build? (
449 - >=sys-apps/sed-4.0.5
450 - app-shells/bash:0[readline]
451 - >=app-admin/eselect-1.2
452 - )
453 - elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
454 - elibc_glibc? ( >=sys-apps/sandbox-2.2 )
455 - elibc_musl? ( >=sys-apps/sandbox-2.2 )
456 - elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
457 - >=app-misc/pax-utils-0.1.17
458 - selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
459 - xattr? ( kernel_linux? (
460 - >=sys-apps/install-xattr-0.3
461 - $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
462 - python2_7 pypy)
463 - ) )
464 - !<app-admin/logrotate-3.8.0"
465 -PDEPEND="
466 - !build? (
467 - >=net-misc/rsync-2.6.4
468 - userland_GNU? ( >=sys-apps/coreutils-6.4 )
469 - )"
470 -# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
471 -# NOTE: FEATURES=installsources requires debugedit and rsync
472 -
473 -REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
474 -
475 -SRC_ARCHIVES="https://dev.gentoo.org/~dolsen/releases/portage"
476 -
477 -prefix_src_archives() {
478 - local x y
479 - for x in ${@}; do
480 - for y in ${SRC_ARCHIVES}; do
481 - echo ${y}/${x}
482 - done
483 - done
484 -}
485 -
486 -TARBALL_PV=${PV}
487 -SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
488 - $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
489 -
490 -pkg_setup() {
491 - use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
492 -}
493 -
494 -python_prepare_all() {
495 - distutils-r1_python_prepare_all
496 -
497 - if ! use ipc ; then
498 - einfo "Disabling ipc..."
499 - sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
500 - -i pym/_emerge/AbstractEbuildProcess.py || \
501 - die "failed to patch AbstractEbuildProcess.py"
502 - fi
503 -
504 - if use xattr && use kernel_linux ; then
505 - einfo "Adding FEATURES=xattr to make.globals ..."
506 - echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
507 - || die "failed to append to make.globals"
508 - fi
509 -
510 - if [[ -n ${EPREFIX} ]] ; then
511 - einfo "Setting portage.const.EPREFIX ..."
512 - sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
513 - -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
514 - -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
515 - -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
516 - -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
517 - -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
518 - -i pym/portage/const.py || \
519 - die "Failed to patch portage.const.EPREFIX"
520 -
521 - einfo "Prefixing shebangs ..."
522 - while read -r -d $'\0' ; do
523 - local shebang=$(head -n1 "$REPLY")
524 - if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
525 - sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
526 - die "sed failed"
527 - fi
528 - done < <(find . -type f -print0)
529 -
530 - einfo "Adjusting make.globals ..."
531 - sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
532 - -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
533 - -i cnf/make.globals || die "sed failed"
534 -
535 - einfo "Adjusting repos.conf ..."
536 - sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
537 - -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
538 - -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
539 - -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
540 - -i cnf/repos.conf || die "sed failed"
541 -
542 - einfo "Adding FEATURES=force-prefix to make.globals ..."
543 - echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
544 - || die "failed to append to make.globals"
545 - fi
546 -
547 - cd "${S}/cnf" || die
548 - if [ -f "make.conf.example.${ARCH}".diff ]; then
549 - patch make.conf.example "make.conf.example.${ARCH}".diff || \
550 - die "Failed to patch make.conf.example"
551 - else
552 - eerror ""
553 - eerror "Portage does not have an arch-specific configuration for this arch."
554 - eerror "Please notify the arch maintainer about this issue. Using generic."
555 - eerror ""
556 - fi
557 -}
558 -
559 -python_compile_all() {
560 - local targets=()
561 - use doc && targets+=( docbook )
562 - use epydoc && targets+=( epydoc )
563 -
564 - if [[ ${targets[@]} ]]; then
565 - esetup.py "${targets[@]}"
566 - fi
567 -}
568 -
569 -python_test() {
570 - esetup.py test
571 -}
572 -
573 -python_install() {
574 - # Install sbin scripts to bindir for python-exec linking
575 - # they will be relocated in pkg_preinst()
576 - distutils-r1_python_install \
577 - --system-prefix="${EPREFIX}/usr" \
578 - --bindir="$(python_get_scriptdir)" \
579 - --docdir="${EPREFIX}/usr/share/doc/${PF}" \
580 - --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
581 - --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
582 - --sbindir="$(python_get_scriptdir)" \
583 - --sysconfdir="${EPREFIX}/etc" \
584 - "${@}"
585 -}
586 -
587 -python_install_all() {
588 - distutils-r1_python_install_all
589 -
590 - local targets=()
591 - use doc && targets+=( install_docbook )
592 - use epydoc && targets+=( install_epydoc )
593 -
594 - # install docs
595 - if [[ ${targets[@]} ]]; then
596 - esetup.py "${targets[@]}"
597 - fi
598 -
599 - # Due to distutils/python-exec limitations
600 - # these must be installed to /usr/bin.
601 - local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
602 - einfo "Moving admin scripts to the correct directory"
603 - dodir /usr/sbin
604 - for target in ${sbin_relocations}; do
605 - einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
606 - mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
607 - done
608 -}
609 -
610 -pkg_preinst() {
611 - # comment out sanity test until it is fixed to work
612 - # with the new PORTAGE_PYM_PATH
613 - #if [[ $ROOT == / ]] ; then
614 - ## Run some minimal tests as a sanity check.
615 - #local test_runner=$(find "${ED}" -name runTests)
616 - #if [[ -n $test_runner && -x $test_runner ]] ; then
617 - #einfo "Running preinst sanity tests..."
618 - #"$test_runner" || die "preinst sanity tests failed"
619 - #fi
620 - #fi
621 -
622 - # elog dir must exist to avoid logrotate error for bug #415911.
623 - # This code runs in preinst in order to bypass the mapping of
624 - # portage:portage to root:root which happens after src_install.
625 - keepdir /var/log/portage/elog
626 - # This is allowed to fail if the user/group are invalid for prefix users.
627 - if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
628 - chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
629 - fi
630 -
631 - if has_version "<${CATEGORY}/${PN}-2.1.13" || \
632 - {
633 - has_version ">=${CATEGORY}/${PN}-2.2_rc0" && \
634 - has_version "<${CATEGORY}/${PN}-2.2.0_alpha189"
635 - } ; then
636 - USERPRIV_UPGRADE=true
637 - USERSYNC_UPGRADE=true
638 - REPOS_CONF_UPGRADE=true
639 - REPOS_CONF_SYNC=
640 - type -P portageq >/dev/null 2>&1 && \
641 - REPOS_CONF_SYNC=$("$(type -P portageq)" envvar SYNC)
642 - else
643 - USERPRIV_UPGRADE=false
644 - USERSYNC_UPGRADE=false
645 - REPOS_CONF_UPGRADE=false
646 - fi
647 -}
648 -
649 -get_ownership() {
650 - case ${USERLAND} in
651 - BSD)
652 - stat -f '%Su:%Sg' "${1}"
653 - ;;
654 - *)
655 - stat -c '%U:%G' "${1}"
656 - ;;
657 - esac
658 -}
659 -
660 -new_config_protect() {
661 - # Generate a ._cfg file even if the target file
662 - # does not exist, ensuring that the user will
663 - # notice the config change.
664 - local basename=${1##*/}
665 - local dirname=${1%/*}
666 - local i=0
667 - while true ; do
668 - local filename=$(
669 - echo -n "${dirname}/._cfg"
670 - printf "%04d" ${i}
671 - echo -n "_${basename}"
672 - )
673 - [[ -e ${filename} ]] || break
674 - (( i++ ))
675 - done
676 - echo "${filename}"
677 -}
678 -
679 -pkg_postinst() {
680 -
681 - if ${REPOS_CONF_UPGRADE} ; then
682 - einfo "Generating repos.conf"
683 - local repo_name=
684 - [[ -f ${PORTDIR}/profiles/repo_name ]] && \
685 - repo_name=$(< "${PORTDIR}/profiles/repo_name")
686 - if [[ -z ${REPOS_CONF_SYNC} ]] ; then
687 - REPOS_CONF_SYNC=$(grep "^sync-uri =" "${EROOT:-${ROOT}}usr/share/portage/config/repos.conf")
688 - REPOS_CONF_SYNC=${REPOS_CONF_SYNC##* }
689 - fi
690 - local sync_type=
691 - [[ ${REPOS_CONF_SYNC} == git://* ]] && sync_type=git
692 -
693 - if [[ ${REPOS_CONF_SYNC} == cvs://* ]]; then
694 - sync_type=cvs
695 - REPOS_CONF_SYNC=${REPOS_CONF_SYNC#cvs://}
696 - fi
697 -
698 - cat <<-EOF > "${T}/repos.conf"
699 - [DEFAULT]
700 - main-repo = ${repo_name:-gentoo}
701 -
702 - [${repo_name:-gentoo}]
703 - location = ${PORTDIR:-${EPREFIX}/usr/portage}
704 - sync-type = ${sync_type:-rsync}
705 - sync-uri = ${REPOS_CONF_SYNC}
706 - EOF
707 -
708 - [[ ${sync_type} == cvs ]] && echo "sync-cvs-repo = $(<"${PORTDIR}/CVS/Repository")" >> "${T}/repos.conf"
709 -
710 - local dest=${EROOT:-${ROOT}}etc/portage/repos.conf
711 - if [[ ! -f ${dest} ]] && mkdir -p "${dest}" 2>/dev/null ; then
712 - dest=${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf
713 - fi
714 - # Don't install the config update if the desired repos.conf directory
715 - # and config file exist, since users may accept it blindly and break
716 - # their config (bug #478726).
717 - [[ -e ${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf ]] || \
718 - mv "${T}/repos.conf" "$(new_config_protect "${dest}")"
719 -
720 - if [[ ${PORTDIR} == ${EPREFIX}/usr/portage ]] ; then
721 - einfo "Generating make.conf PORTDIR setting for backward compatibility"
722 - for dest in "${EROOT:-${ROOT}}etc/make.conf" "${EROOT:-${ROOT}}etc/portage/make.conf" ; do
723 - [[ -e ${dest} ]] && break
724 - done
725 - [[ -d ${dest} ]] && dest=${dest}/portdir.conf
726 - rm -rf "${T}/make.conf"
727 - [[ -f ${dest} ]] && cat "${dest}" > "${T}/make.conf"
728 - cat <<-EOF >> "${T}/make.conf"
729 -
730 - # Set PORTDIR for backward compatibility with various tools:
731 - # gentoo-bashcomp - bug #478444
732 - # euse - bug #474574
733 - # euses and ufed - bug #478318
734 - PORTDIR="${EPREFIX}/usr/portage"
735 - EOF
736 - mkdir -p "${dest%/*}"
737 - mv "${T}/make.conf" "$(new_config_protect "${dest}")"
738 - fi
739 - fi
740 -
741 - local distdir=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}
742 -
743 - if ${USERSYNC_UPGRADE} && \
744 - [[ -d ${PORTDIR} && -w ${PORTDIR} ]] ; then
745 - local ownership=$(get_ownership "${PORTDIR}")
746 - if [[ -n ${ownership} ]] ; then
747 - einfo "Adjusting PORTDIR permissions for usersync"
748 - find "${PORTDIR}" -path "${distdir%/}" -prune -o \
749 - ! \( -user "${ownership%:*}" -a -group "${ownership#*:}" \) \
750 - -exec chown "${ownership}" {} +
751 - fi
752 - fi
753 -
754 - # Do this last, since it could take a long time if there
755 - # are lots of live sources, and the user may be tempted
756 - # to kill emerge while it is running.
757 - if ${USERPRIV_UPGRADE} && \
758 - [[ -d ${distdir} && -w ${distdir} ]] ; then
759 - local ownership=$(get_ownership "${distdir}")
760 - if [[ ${ownership#*:} == portage ]] ; then
761 - einfo "Adjusting DISTDIR permissions for userpriv"
762 - find "${distdir}" -mindepth 1 -maxdepth 1 -type d -uid 0 \
763 - -exec chown -R portage:portage {} +
764 - fi
765 - fi
766 -
767 - einfo ""
768 - einfo "This release of portage NO LONGER contains the repoman code base."
769 - einfo "Repoman has its own ebuild and release package."
770 - einfo "For repoman functionality please emerge app-portage/repoman"
771 - einfo "Please report any bugs you may encounter."
772 - einfo ""
773 -}
774
775 diff --git a/sys-apps/portage/portage-2.3.3.ebuild b/sys-apps/portage/portage-2.3.3.ebuild
776 deleted file mode 100644
777 index b061595e4ab..00000000000
778 --- a/sys-apps/portage/portage-2.3.3.ebuild
779 +++ /dev/null
780 @@ -1,277 +0,0 @@
781 -# Copyright 1999-2017 Gentoo Foundation
782 -# Distributed under the terms of the GNU General Public License v2
783 -
784 -EAPI=5
785 -
786 -PYTHON_COMPAT=(
787 - pypy
788 - python3_3 python3_4 python3_5 python3_6
789 - python2_7
790 -)
791 -PYTHON_REQ_USE='bzip2(+),threads(+)'
792 -
793 -inherit distutils-r1 multilib
794 -
795 -DESCRIPTION="Portage is the package management and distribution system for Gentoo"
796 -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
797 -
798 -LICENSE="GPL-2"
799 -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
800 -SLOT="0"
801 -IUSE="build doc epydoc +ipc linguas_ru +native-extensions selinux xattr"
802 -
803 -DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
804 - >=app-arch/tar-1.27
805 - dev-lang/python-exec:2
806 - >=sys-apps/sed-4.0.5 sys-devel/patch
807 - doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
808 - epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
809 -# Require sandbox-2.2 for bug #288863.
810 -# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
811 -# quite slow, so it's not considered in the dependencies as an alternative to
812 -# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
813 -# for now, don't pull in xattr deps for other kernels.
814 -# For whirlpool hash, require python[ssl] (bug #425046).
815 -# For compgen, require bash[readline] (bug #445576).
816 -RDEPEND="
817 - >=app-arch/tar-1.27
818 - dev-lang/python-exec:2
819 - !build? (
820 - >=sys-apps/sed-4.0.5
821 - app-shells/bash:0[readline]
822 - >=app-admin/eselect-1.2
823 - )
824 - elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
825 - elibc_glibc? ( >=sys-apps/sandbox-2.2 )
826 - elibc_musl? ( >=sys-apps/sandbox-2.2 )
827 - elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
828 - >=app-misc/pax-utils-0.1.17
829 - selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
830 - xattr? ( kernel_linux? (
831 - >=sys-apps/install-xattr-0.3
832 - $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
833 - python2_7 pypy)
834 - ) )
835 - !<app-admin/logrotate-3.8.0"
836 -PDEPEND="
837 - !build? (
838 - >=net-misc/rsync-2.6.4
839 - userland_GNU? ( >=sys-apps/coreutils-6.4 )
840 - )"
841 -# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
842 -# NOTE: FEATURES=installsources requires debugedit and rsync
843 -
844 -REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
845 -
846 -SRC_ARCHIVES="https://dev.gentoo.org/~dolsen/releases/portage"
847 -
848 -prefix_src_archives() {
849 - local x y
850 - for x in ${@}; do
851 - for y in ${SRC_ARCHIVES}; do
852 - echo ${y}/${x}
853 - done
854 - done
855 -}
856 -
857 -TARBALL_PV=${PV}
858 -SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
859 - $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
860 -
861 -pkg_setup() {
862 - use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
863 -}
864 -
865 -python_prepare_all() {
866 - distutils-r1_python_prepare_all
867 -
868 - if use native-extensions; then
869 - printf "[build_ext]\nportage-ext-modules=true\n" >> \
870 - setup.cfg || die
871 - fi
872 -
873 - if ! use ipc ; then
874 - einfo "Disabling ipc..."
875 - sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
876 - -i pym/_emerge/AbstractEbuildProcess.py || \
877 - die "failed to patch AbstractEbuildProcess.py"
878 - fi
879 -
880 - if use xattr && use kernel_linux ; then
881 - einfo "Adding FEATURES=xattr to make.globals ..."
882 - echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
883 - || die "failed to append to make.globals"
884 - fi
885 -
886 - if [[ -n ${EPREFIX} ]] ; then
887 - einfo "Setting portage.const.EPREFIX ..."
888 - sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
889 - -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
890 - -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
891 - -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
892 - -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
893 - -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
894 - -i pym/portage/const.py || \
895 - die "Failed to patch portage.const.EPREFIX"
896 -
897 - einfo "Prefixing shebangs ..."
898 - while read -r -d $'\0' ; do
899 - local shebang=$(head -n1 "$REPLY")
900 - if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
901 - sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
902 - die "sed failed"
903 - fi
904 - done < <(find . -type f -print0)
905 -
906 - einfo "Adjusting make.globals ..."
907 - sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
908 - -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
909 - -i cnf/make.globals || die "sed failed"
910 -
911 - einfo "Adjusting repos.conf ..."
912 - sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
913 - -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
914 - -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
915 - -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
916 - -i cnf/repos.conf || die "sed failed"
917 -
918 - einfo "Adding FEATURES=force-prefix to make.globals ..."
919 - echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
920 - || die "failed to append to make.globals"
921 - fi
922 -
923 - cd "${S}/cnf" || die
924 - if [ -f "make.conf.example.${ARCH}".diff ]; then
925 - patch make.conf.example "make.conf.example.${ARCH}".diff || \
926 - die "Failed to patch make.conf.example"
927 - else
928 - eerror ""
929 - eerror "Portage does not have an arch-specific configuration for this arch."
930 - eerror "Please notify the arch maintainer about this issue. Using generic."
931 - eerror ""
932 - fi
933 -}
934 -
935 -python_compile_all() {
936 - local targets=()
937 - use doc && targets+=( docbook )
938 - use epydoc && targets+=( epydoc )
939 -
940 - if [[ ${targets[@]} ]]; then
941 - esetup.py "${targets[@]}"
942 - fi
943 -}
944 -
945 -python_test() {
946 - esetup.py test
947 -}
948 -
949 -python_install() {
950 - # Install sbin scripts to bindir for python-exec linking
951 - # they will be relocated in pkg_preinst()
952 - distutils-r1_python_install \
953 - --system-prefix="${EPREFIX}/usr" \
954 - --bindir="$(python_get_scriptdir)" \
955 - --docdir="${EPREFIX}/usr/share/doc/${PF}" \
956 - --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
957 - --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
958 - --sbindir="$(python_get_scriptdir)" \
959 - --sysconfdir="${EPREFIX}/etc" \
960 - "${@}"
961 -}
962 -
963 -python_install_all() {
964 - distutils-r1_python_install_all
965 -
966 - local targets=()
967 - use doc && targets+=( install_docbook )
968 - use epydoc && targets+=( install_epydoc )
969 -
970 - # install docs
971 - if [[ ${targets[@]} ]]; then
972 - esetup.py "${targets[@]}"
973 - fi
974 -
975 - # Due to distutils/python-exec limitations
976 - # these must be installed to /usr/bin.
977 - local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
978 - einfo "Moving admin scripts to the correct directory"
979 - dodir /usr/sbin
980 - for target in ${sbin_relocations}; do
981 - einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
982 - mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
983 - done
984 -}
985 -
986 -pkg_preinst() {
987 - # comment out sanity test until it is fixed to work
988 - # with the new PORTAGE_PYM_PATH
989 - #if [[ $ROOT == / ]] ; then
990 - ## Run some minimal tests as a sanity check.
991 - #local test_runner=$(find "${ED}" -name runTests)
992 - #if [[ -n $test_runner && -x $test_runner ]] ; then
993 - #einfo "Running preinst sanity tests..."
994 - #"$test_runner" || die "preinst sanity tests failed"
995 - #fi
996 - #fi
997 -
998 - # elog dir must exist to avoid logrotate error for bug #415911.
999 - # This code runs in preinst in order to bypass the mapping of
1000 - # portage:portage to root:root which happens after src_install.
1001 - keepdir /var/log/portage/elog
1002 - # This is allowed to fail if the user/group are invalid for prefix users.
1003 - if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
1004 - chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
1005 - fi
1006 -
1007 - if has_version ">=${CATEGORY}/${PN}-2.3.1" && \
1008 - has_version "<${CATEGORY}/${PN}-2.3.3"; then
1009 - SYNC_DEPTH_UPGRADE=true
1010 - else
1011 - SYNC_DEPTH_UPGRADE=false
1012 - fi
1013 -}
1014 -
1015 -get_ownership() {
1016 - case ${USERLAND} in
1017 - BSD)
1018 - stat -f '%Su:%Sg' "${1}"
1019 - ;;
1020 - *)
1021 - stat -c '%U:%G' "${1}"
1022 - ;;
1023 - esac
1024 -}
1025 -
1026 -new_config_protect() {
1027 - # Generate a ._cfg file even if the target file
1028 - # does not exist, ensuring that the user will
1029 - # notice the config change.
1030 - local basename=${1##*/}
1031 - local dirname=${1%/*}
1032 - local i=0
1033 - while true ; do
1034 - local filename=$(
1035 - echo -n "${dirname}/._cfg"
1036 - printf "%04d" ${i}
1037 - echo -n "_${basename}"
1038 - )
1039 - [[ -e ${filename} ]] || break
1040 - (( i++ ))
1041 - done
1042 - echo "${filename}"
1043 -}
1044 -
1045 -pkg_postinst() {
1046 - if ${SYNC_DEPTH_UPGRADE}; then
1047 - ewarn "Please note that this release no longer respects sync-depth for"
1048 - ewarn "git repositories. There have been too many problems and"
1049 - ewarn "performance issues. See bugs 552814, 559008"
1050 - fi
1051 - einfo ""
1052 - einfo "This release of portage NO LONGER contains the repoman code base."
1053 - einfo "Repoman has its own ebuild and release package."
1054 - einfo "For repoman functionality please emerge app-portage/repoman"
1055 - einfo "Please report any bugs you may encounter."
1056 - einfo ""
1057 -}
1058
1059 diff --git a/sys-apps/portage/portage-2.3.4.ebuild b/sys-apps/portage/portage-2.3.4.ebuild
1060 deleted file mode 100644
1061 index 8611b2060ec..00000000000
1062 --- a/sys-apps/portage/portage-2.3.4.ebuild
1063 +++ /dev/null
1064 @@ -1,277 +0,0 @@
1065 -# Copyright 1999-2017 Gentoo Foundation
1066 -# Distributed under the terms of the GNU General Public License v2
1067 -
1068 -EAPI=5
1069 -
1070 -PYTHON_COMPAT=(
1071 - pypy
1072 - python3_3 python3_4 python3_5 python3_6
1073 - python2_7
1074 -)
1075 -PYTHON_REQ_USE='bzip2(+),threads(+)'
1076 -
1077 -inherit distutils-r1 multilib
1078 -
1079 -DESCRIPTION="Portage is the package management and distribution system for Gentoo"
1080 -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
1081 -
1082 -LICENSE="GPL-2"
1083 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
1084 -SLOT="0"
1085 -IUSE="build doc epydoc +ipc linguas_ru +native-extensions selinux xattr"
1086 -
1087 -DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') )
1088 - >=app-arch/tar-1.27
1089 - dev-lang/python-exec:2
1090 - >=sys-apps/sed-4.0.5 sys-devel/patch
1091 - doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
1092 - epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )"
1093 -# Require sandbox-2.2 for bug #288863.
1094 -# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
1095 -# quite slow, so it's not considered in the dependencies as an alternative to
1096 -# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
1097 -# for now, don't pull in xattr deps for other kernels.
1098 -# For whirlpool hash, require python[ssl] (bug #425046).
1099 -# For compgen, require bash[readline] (bug #445576).
1100 -RDEPEND="
1101 - >=app-arch/tar-1.27
1102 - dev-lang/python-exec:2
1103 - !build? (
1104 - >=sys-apps/sed-4.0.5
1105 - app-shells/bash:0[readline]
1106 - >=app-admin/eselect-1.2
1107 - )
1108 - elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
1109 - elibc_glibc? ( >=sys-apps/sandbox-2.2 )
1110 - elibc_musl? ( >=sys-apps/sandbox-2.2 )
1111 - elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
1112 - >=app-misc/pax-utils-0.1.17
1113 - selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
1114 - xattr? ( kernel_linux? (
1115 - >=sys-apps/install-xattr-0.3
1116 - $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \
1117 - python2_7 pypy)
1118 - ) )
1119 - !<app-admin/logrotate-3.8.0"
1120 -PDEPEND="
1121 - !build? (
1122 - >=net-misc/rsync-2.6.4
1123 - userland_GNU? ( >=sys-apps/coreutils-6.4 )
1124 - )"
1125 -# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
1126 -# NOTE: FEATURES=installsources requires debugedit and rsync
1127 -
1128 -REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
1129 -
1130 -SRC_ARCHIVES="https://dev.gentoo.org/~dolsen/releases/portage"
1131 -
1132 -prefix_src_archives() {
1133 - local x y
1134 - for x in ${@}; do
1135 - for y in ${SRC_ARCHIVES}; do
1136 - echo ${y}/${x}
1137 - done
1138 - done
1139 -}
1140 -
1141 -TARBALL_PV=${PV}
1142 -SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
1143 - $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
1144 -
1145 -pkg_setup() {
1146 - use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
1147 -}
1148 -
1149 -python_prepare_all() {
1150 - distutils-r1_python_prepare_all
1151 -
1152 - if use native-extensions; then
1153 - printf "[build_ext]\nportage-ext-modules=true\n" >> \
1154 - setup.cfg || die
1155 - fi
1156 -
1157 - if ! use ipc ; then
1158 - einfo "Disabling ipc..."
1159 - sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
1160 - -i pym/_emerge/AbstractEbuildProcess.py || \
1161 - die "failed to patch AbstractEbuildProcess.py"
1162 - fi
1163 -
1164 - if use xattr && use kernel_linux ; then
1165 - einfo "Adding FEATURES=xattr to make.globals ..."
1166 - echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
1167 - || die "failed to append to make.globals"
1168 - fi
1169 -
1170 - if [[ -n ${EPREFIX} ]] ; then
1171 - einfo "Setting portage.const.EPREFIX ..."
1172 - sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
1173 - -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
1174 - -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
1175 - -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
1176 - -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
1177 - -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
1178 - -i pym/portage/const.py || \
1179 - die "Failed to patch portage.const.EPREFIX"
1180 -
1181 - einfo "Prefixing shebangs ..."
1182 - while read -r -d $'\0' ; do
1183 - local shebang=$(head -n1 "$REPLY")
1184 - if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
1185 - sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
1186 - die "sed failed"
1187 - fi
1188 - done < <(find . -type f -print0)
1189 -
1190 - einfo "Adjusting make.globals ..."
1191 - sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
1192 - -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
1193 - -i cnf/make.globals || die "sed failed"
1194 -
1195 - einfo "Adjusting repos.conf ..."
1196 - sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
1197 - -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
1198 - -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
1199 - -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
1200 - -i cnf/repos.conf || die "sed failed"
1201 -
1202 - einfo "Adding FEATURES=force-prefix to make.globals ..."
1203 - echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
1204 - || die "failed to append to make.globals"
1205 - fi
1206 -
1207 - cd "${S}/cnf" || die
1208 - if [ -f "make.conf.example.${ARCH}".diff ]; then
1209 - patch make.conf.example "make.conf.example.${ARCH}".diff || \
1210 - die "Failed to patch make.conf.example"
1211 - else
1212 - eerror ""
1213 - eerror "Portage does not have an arch-specific configuration for this arch."
1214 - eerror "Please notify the arch maintainer about this issue. Using generic."
1215 - eerror ""
1216 - fi
1217 -}
1218 -
1219 -python_compile_all() {
1220 - local targets=()
1221 - use doc && targets+=( docbook )
1222 - use epydoc && targets+=( epydoc )
1223 -
1224 - if [[ ${targets[@]} ]]; then
1225 - esetup.py "${targets[@]}"
1226 - fi
1227 -}
1228 -
1229 -python_test() {
1230 - esetup.py test
1231 -}
1232 -
1233 -python_install() {
1234 - # Install sbin scripts to bindir for python-exec linking
1235 - # they will be relocated in pkg_preinst()
1236 - distutils-r1_python_install \
1237 - --system-prefix="${EPREFIX}/usr" \
1238 - --bindir="$(python_get_scriptdir)" \
1239 - --docdir="${EPREFIX}/usr/share/doc/${PF}" \
1240 - --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
1241 - --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \
1242 - --sbindir="$(python_get_scriptdir)" \
1243 - --sysconfdir="${EPREFIX}/etc" \
1244 - "${@}"
1245 -}
1246 -
1247 -python_install_all() {
1248 - distutils-r1_python_install_all
1249 -
1250 - local targets=()
1251 - use doc && targets+=( install_docbook )
1252 - use epydoc && targets+=( install_epydoc )
1253 -
1254 - # install docs
1255 - if [[ ${targets[@]} ]]; then
1256 - esetup.py "${targets[@]}"
1257 - fi
1258 -
1259 - # Due to distutils/python-exec limitations
1260 - # these must be installed to /usr/bin.
1261 - local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
1262 - einfo "Moving admin scripts to the correct directory"
1263 - dodir /usr/sbin
1264 - for target in ${sbin_relocations}; do
1265 - einfo "Moving /usr/bin/${target} to /usr/sbin/${target}"
1266 - mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!"
1267 - done
1268 -}
1269 -
1270 -pkg_preinst() {
1271 - # comment out sanity test until it is fixed to work
1272 - # with the new PORTAGE_PYM_PATH
1273 - #if [[ $ROOT == / ]] ; then
1274 - ## Run some minimal tests as a sanity check.
1275 - #local test_runner=$(find "${ED}" -name runTests)
1276 - #if [[ -n $test_runner && -x $test_runner ]] ; then
1277 - #einfo "Running preinst sanity tests..."
1278 - #"$test_runner" || die "preinst sanity tests failed"
1279 - #fi
1280 - #fi
1281 -
1282 - # elog dir must exist to avoid logrotate error for bug #415911.
1283 - # This code runs in preinst in order to bypass the mapping of
1284 - # portage:portage to root:root which happens after src_install.
1285 - keepdir /var/log/portage/elog
1286 - # This is allowed to fail if the user/group are invalid for prefix users.
1287 - if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
1288 - chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
1289 - fi
1290 -
1291 - if has_version ">=${CATEGORY}/${PN}-2.3.1" && \
1292 - has_version "<${CATEGORY}/${PN}-2.3.3"; then
1293 - SYNC_DEPTH_UPGRADE=true
1294 - else
1295 - SYNC_DEPTH_UPGRADE=false
1296 - fi
1297 -}
1298 -
1299 -get_ownership() {
1300 - case ${USERLAND} in
1301 - BSD)
1302 - stat -f '%Su:%Sg' "${1}"
1303 - ;;
1304 - *)
1305 - stat -c '%U:%G' "${1}"
1306 - ;;
1307 - esac
1308 -}
1309 -
1310 -new_config_protect() {
1311 - # Generate a ._cfg file even if the target file
1312 - # does not exist, ensuring that the user will
1313 - # notice the config change.
1314 - local basename=${1##*/}
1315 - local dirname=${1%/*}
1316 - local i=0
1317 - while true ; do
1318 - local filename=$(
1319 - echo -n "${dirname}/._cfg"
1320 - printf "%04d" ${i}
1321 - echo -n "_${basename}"
1322 - )
1323 - [[ -e ${filename} ]] || break
1324 - (( i++ ))
1325 - done
1326 - echo "${filename}"
1327 -}
1328 -
1329 -pkg_postinst() {
1330 - if ${SYNC_DEPTH_UPGRADE}; then
1331 - ewarn "Please note that this release no longer respects sync-depth for"
1332 - ewarn "git repositories. There have been too many problems and"
1333 - ewarn "performance issues. See bugs 552814, 559008"
1334 - fi
1335 - einfo ""
1336 - einfo "This release of portage NO LONGER contains the repoman code base."
1337 - einfo "Repoman has its own ebuild and release package."
1338 - einfo "For repoman functionality please emerge app-portage/repoman"
1339 - einfo "Please report any bugs you may encounter."
1340 - einfo ""
1341 -}