Gentoo Archives: gentoo-commits

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