summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2014-08-12 19:54:47 +0000
committerBrian Dolbec <dolsen@gentoo.org>2014-08-12 19:54:47 +0000
commitb02e1009caaecc191d57c893f5333d0faeddb59f (patch)
tree891b76b09f41e77bbbe904a73c9449b41750b797 /sys-apps
parentFix FEATURES=test masking on dev-ruby/tilt (diff)
downloadhistorical-b02e1009caaecc191d57c893f5333d0faeddb59f.tar.gz
historical-b02e1009caaecc191d57c893f5333d0faeddb59f.tar.bz2
historical-b02e1009caaecc191d57c893f5333d0faeddb59f.zip
version bump. Add closed bug #'s to 2.2.11 release
Package-Manager: portage-2.2.12/cvs/Linux x86_64 Manifest-Sign-Key: 0x65E309F2189DB0B8
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/portage/ChangeLog12
-rw-r--r--sys-apps/portage/Manifest20
-rw-r--r--sys-apps/portage/portage-2.2.12.ebuild572
3 files changed, 592 insertions, 12 deletions
diff --git a/sys-apps/portage/ChangeLog b/sys-apps/portage/ChangeLog
index e9e85c1ae33b..dd8a1b707142 100644
--- a/sys-apps/portage/ChangeLog
+++ b/sys-apps/portage/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-apps/portage
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1402 2014/08/05 14:19:02 dolsen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1403 2014/08/12 19:54:39 dolsen Exp $
+
+*portage-2.2.12 (12 Aug 2014)
+
+ 12 Aug 2014; Brian Dolbec <dolsen@gentoo.org> +portage-2.2.12.ebuild:
+ Version bump. Fixes bugs 512578, 519074, 518968. New emaint module "merges".
05 Aug 2014; Brian Dolbec <dolsen@gentoo.org> portage-2.2.11-r1.ebuild,
portage-9999.ebuild:
@@ -20,7 +25,8 @@
*portage-2.2.11 (03 Aug 2014)
03 Aug 2014; Brian Dolbec <dolsen@gentoo.org> +portage-2.2.11.ebuild:
- new portage release
+ new portage release. Fixes bugs 516428, 517416, 501534, 511984, 487074,
+ 512690, 510538, 438976, 506186, 488820, 505944, 505428.
26 Jul 2014; Michał Górny <mgorny@gentoo.org> portage-9999.ebuild:
Remove code for python2_6 & pypy2_0 which both are removed nowadays.
@@ -119,7 +125,7 @@
version bump. This fixes the following bugs: bug #395359,
bug #472104, bug #485920, bug #486580, bug #487198, bug #488972,
bug #489544, bug #489662, bug #490362, bug #491426, bug #492314.
- Bug #484436 tracks all bugs since portage-2.2.1.
+ Bug #484436 tracks all bugs since portage-2.2.1.
23 Dec 2013; Agostino Sarubbo <ago@gentoo.org> portage-2.2.7.ebuild:
Stable for sparc, wrt bug #488156
diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
index 22958c26b44c..35cc2ec64895 100644
--- a/sys-apps/portage/Manifest
+++ b/sys-apps/portage/Manifest
@@ -9,6 +9,7 @@ DIST portage-2.1.6.tar.bz2 518771 SHA256 b1c507445b3858449c861568f477e1cfab8b232
DIST portage-2.2.1.tar.bz2 901964 SHA256 fe75ead9460bae22d66c18e263e3fc71b9e9415c8d5aa737351997fd2a42dde7 SHA512 775544325d3258d958126241c3a6c332eb222da6f3aeb7b4363d1ab76839cf50c8fcce0d3108648045bbcae4470ef2314806ca5ff71abf1bae6d0b51ea3c5803 WHIRLPOOL 6a0b24d7df52e07716e5518f1c31ac52d5d14c0ad5e117c40ba8e852e7aa3c63ecbdf375b83127f1070a0e2a5083820f81799da1b7ec1d18dcd0455e3ed985fd
DIST portage-2.2.10.tar.bz2 878039 SHA256 f463a98062f09f41da680ba7d20621b3076de86844a04340725df7d734965fa2 SHA512 4f563a67388b2593f08833281f6da004dd6af3a7e697b89d735ab24b8b9f43e1d1e66202f8607710dcde6423672d6f97c7ad32c7f983f8491a05543e453fedae WHIRLPOOL 0f2fd79ba4117c1cf328c9e08ac35990869b0518ee8eba10453b6c957a351159de4f3c0b7e7242f8b89c2504d4403e7ed36c8c2da010fa2ec75e3f9e67858069
DIST portage-2.2.11.tar.bz2 879223 SHA256 78a9184623cb0f3bd9b1fb1eba0eca13104ed76d877e0ba3fb2d9621be16720b SHA512 c8d86441408ee74c72b62c57c5319b882df9a6f7249cd24f3bcfa21fad1d3f93e6bacd6b2d13a229416872aba642a2a6a10df4a940d5b51a51ca4cf7daa01b13 WHIRLPOOL ec73b72a3578d6b1b326550c4d66b3d3147b7f8d46c64b0640a411a74d2241d97b1b956b19a42d0a973d79bfc7d5d6629df8aa53a55415e37b9da595bc7866db
+DIST portage-2.2.12.tar.bz2 879865 SHA256 d745d3d20abc0347632bf3a66bd80e5a45db24f3ba047cfbbacea8812156062f SHA512 55426a2d34227a4e0998342a62cd76ae9e1499ae5a92b62a10c93f7957012170615ab9d204878a25e815ee5ef9e925fe800f0eb7c3c35307577ba0ed8b38461c WHIRLPOOL 7f6987fbda9f59643e8693d75b3ed10a9b57ce5fa82a80679cc663ef1c02dbbf9986542c0e3b6638a3f4a5fb6058a0e06738a46e0f44fc5f56daed509f5bf12b
DIST portage-2.2.7.tar.bz2 906952 SHA256 005af49dbf9a58425b1f47904ce4d2398eb2155082169ec50215319e876273af SHA512 326623785bdf80e11a05a3c9ed0549a659d4549f1636d4fed2b204a3b751941ea101a12f75323eda86c224f7a7b67638e2fe0572327879a73d1721cfaf5be40b WHIRLPOOL 1c989c016503b1ad189fcdff26fce3e77aa5b0f9c1d4830fd99e5120a49c9dafb1220a30b61cddd84b3db824e738eac993e8944fafed85417fafa0dda6eeedbc
DIST portage-2.2.8.tar.bz2 874672 SHA256 c1074e01173df5384e003598dbc5f64f09e92f83fd26faab2f88f9f0bc64aa7e SHA512 acc47d94ff8c08e5a7bf2d4c4e600863430dd1e7d0bb8b4254d6477a498933cae663db84debf9487d2243c2cba689629ef8e8b6cf108e10d40e89e8e8d7e1257 WHIRLPOOL d54290ede8d3d85e5211cda7e86ed740178121ef2f47cf0858c27941d8679d29c11445befff962986d40a47ded50d0d4654de19e7d4aef3fdf2546655a0d6fe2
DIST portage-man-pl-2.1.2.tar.bz2 53893 SHA256 960eaa7c6f3a2af44bdc665266a8e884628a562373cc477d301597ecc5ef961f SHA512 5f5c8dd1559048546633b1e7291ff8c0f5d637595f1a4c98405424b08c30c089fc9359e0214f78fbe358754f20d327794f4692b9b67639585c29b755975ee853 WHIRLPOOL 756e267b84077501d976f46fa448cda5368cd52aeca6ec43d109c81fe8e2364e0cd0f35630d68a4186c70e3b440b7c870b86ac7ef83cc0afa43e10f9f8e1f422
@@ -17,22 +18,23 @@ EBUILD portage-2.1.6.7_p1.ebuild 8307 SHA256 2b8b33ff1538f26c502e8606044ee18dfe7
EBUILD portage-2.2.1.ebuild 19238 SHA256 4e2e9ccfd1efd3b8965903d77da2c2736d9af1d90dcf883a07ebfbd88357d270 SHA512 c268f45e4e76e4fc46780714dec018fbba66f0b66d068dac6afd50ae8cb8cf335a42aa112716fba9815e516b6ad06eeaa4a967a8c247fac39dc7c3703c214181 WHIRLPOOL de17ddb295aa66b5585ae6957599dec4836ebe56922b70661c024e3a0fcbaffa13c7ace80c428201f82358f068a1bf24b315118aec68d713e28e90619ab8302a
EBUILD portage-2.2.10.ebuild 19399 SHA256 2f7eb7e1de38eddf47d149251b86798fdbc2ff428484dc1a9e955cf988bd0474 SHA512 e8ec7297d211de29673036ec98307c69e91535e9099b3ddaf6ded119e8dab3a5e4e6edbf64618b37af8756735e24c677ac2fbd2ea6e3dc5ba7540c58e281ced4 WHIRLPOOL 5cc0ada19a89686ebc8e47cfb5566c93a7b618f591f0d57101c42787af85035d9a194b2ea18521ce17f34b79666ddb9f8be4ce7a332829b7df866e0d292827fd
EBUILD portage-2.2.11-r1.ebuild 19047 SHA256 3f00db65cef46585f18bfd9581c39534834c9f9b2b451c4b8434c44a0c4e1c9a SHA512 1f4ae99990f758d82b9b9d9fa988688b9cd3a2ea92bd516857e5ba7b0053d218aee3164fb8c25df0f4752969914fdb86f3d8241329e9d4f91ccdd571d808ce58 WHIRLPOOL a2ae2f5591b20661187c60c183846237ac566334560bcc4b7495b6163254362896fd2cb8a6c908df8a8e2e7b9efd4924f71730b300bbf6c1a51dee1f9a745b95
+EBUILD portage-2.2.12.ebuild 19009 SHA256 820aed7f219c712121eb56211a620e4a7ec2c1b64c813dad18a5ec6e3cefc14c SHA512 86136d2e27f2ad6b7820d29f92bed86559638355c5560618c78fe2dcc9e25b98bc4a7d78f20c0dc601fd7f33b9bbd12be4a8b9ebf5ac099166ae8c480b56d7eb WHIRLPOOL 8284303e34766d2338884dfc328882f959747ce1fefd6436461298b48284703fb857333f76b29936b71f03e8362859c6e218631073b247b68d75da93e4cbcb2a
EBUILD portage-2.2.7.ebuild 19244 SHA256 f4f40a7da1d0312dcd3bc2f45e88092458f05e65c8ea3d5b08b86a8a06aa68f5 SHA512 db283aff6267f3990d3750ef6bd1e2e8e4bf3591225f5855f83e6662794b0f2dd58f65bec5d14e216e92ac81df7842d83ed3b56eb05f0f4ccd5466dee722817c WHIRLPOOL a152ba0faa2b853b8ed7244a6aa12971105cc90039adc76cd200d350b69f3ca97ff91613cdcf46e3f8a9157052d9f3161ba85a662b3c6c29a8b79d4b8aa2b9e6
EBUILD portage-2.2.8-r1.ebuild 19344 SHA256 35ab2aa38ca4dd77373cebdfe04a47291601790dbef63be5bb2ec74866bf5f1e SHA512 4e6133e4792423bd426fba0fb951d08ba56866ac0942aa572892bbb6654853ab6ba10c22c209ebc4126af99aaf253aab7647342e984ac5cd41ed5e179e129add WHIRLPOOL 10cf3d7c4c5b4c3e19a0ab459d260779e7f82ce9fe81932b65da0f855450dbe83f0a9d87eb4bb1d735aab4d78a50d3df0c4e911bd19e054f5728cd2f2cc067a2
EBUILD portage-9999.ebuild 13392 SHA256 86723f61fa51872305c9cc987a16a93148111e1dcf39d234d1c8f15b040a91de SHA512 0f91bc77efdf59e9e0d906024c5ea6d49c4a62e167b37b0d674efdda06594218ffebcb5f7a5263e1c6ece4e6fba7bdc13c01b56289e47bd43ca69cd6109538af WHIRLPOOL d26ed25b8002b764e4ca66d9dc674322500015a6a930da8a9137732f713fb481b280471a87179645c89e6635a7c6d9c7cb2999725f2407dc82ce0e6c54bc4a9e
-MISC ChangeLog 57482 SHA256 0b1884ccf902922ba9939ee1df0ac559b807a273b4c9ef72b943536481ed2887 SHA512 cc8f1314b26c2238ee37e7a349871d752c744b7ff039a4072b50643c39289f877b75c71cc0216a4839df6d5500eb5093c6c4ef2d6d59a1471ea37db4ee8395ce WHIRLPOOL 0f526d0d149fc473f1b833cb8da25f82553201b757cb33d589bf8ea9694a834ee79aa935e48005bf0bd27da1087679f7f255e72e3bbf831bccf77e30409db522
+MISC ChangeLog 57775 SHA256 dce9cf1bf7422823a8119f2843e1692a68067194078b540afebe7e1dc020865b SHA512 f24f142f6b789fd2ee9ede4e6a23eaf7e0fd67cf062a139f65fc7ab4ea62b1a524d5a4ab8fc5115b7ebce4715036105543d6fb187a4e2225e53c77ca46b7fb64 WHIRLPOOL 48999eaf1efcbb9d1ae69e9bf5ba37f7d6ba69602b8f9a11d3f8a13ddaea9186acadf353265e5aec2a0ce5404661b654755e64c0726bbd3cb5de988a42a583e0
MISC ChangeLog-2012 133873 SHA256 157a7eb13d4cf2e2c94bfcb7e91f218af1ea88f5ff20c24a50546950a9839c94 SHA512 1241f4ccd7b31bdd340649417257b0e95202992feb66e0cd4d41fc2d35bf0baeac19680f34a831d2fefce0c0fec03aa6e7a191f783e59cf9b93aaf266f010a3f WHIRLPOOL b027bdba0f5ccc1b3a2dc18df92d82b473af5e55536816b7177071c1ae1a89e4d50d42c2093fa1bbe28b92a42014fbefbfc9e7daa4e6426ebecbd5bffc3d479f
MISC metadata.xml 1170 SHA256 15c6872c40d2c334c6c7bb2d020f5486296e1727c02254257ed5bba0c58af955 SHA512 ca57a95360f6becef6c622d8a5c384d864bd6118776b43d88b7deb1b058dc46b47019813d7e2606b6d4665bd1bed113eae5445ddb948f939954172b5fe859d74 WHIRLPOOL 77e420267361675e733e8364d1fde83d7b2833d6e28823599078f1d771aeb592d0e9146019a45268696b05709e56880e7707e0240f843015e17a82930bac5cf2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-iQF8BAEBCABmBQJT4OegXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+iQF8BAEBCABmBQJT6nDDXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4Njg4RkQxQ0M3MUMxQzA0RUFFQTQyMzcy
-MjE0RDkwQTAxNEYxN0NCAAoJECIU2QoBTxfLbaIH/3/ZSQUraQEBwh0E/5fuUDnN
-hJpKToKcTGwUT38Lq/pvTcBzzLwCXQu7liA9WT/mx0THeDqpjKMmCBLiHDqR/6Kz
-8nvxq1EYLBZB+3nvY7gaOVik6QBrmy7DPlXl5Xxp3ahRckgpCpVWyoeTcCB6AGG6
-gNWO5FBCbQ3clIrp0i5WPOijsHE2KXDgqPaPxilyhRjeCUtB0GTbJSGX+iZ/+jzk
-mLIQpPcEoVe/2SOl4JX5xQ+0FBZPAff5a+09GczHhAisFq0XUGVIjb4kRi0ITZO7
-RXAm+nANBsrjFlFNgVDDuYsJzamZZDejW/Pzc1zZhpD920ofK7yFeiSSIpDQwco=
-=Uzqt
+MjE0RDkwQTAxNEYxN0NCAAoJECIU2QoBTxfLeLcH/1ZBc4B+P6Mt7sbKVN6fXKY9
+bJOG6BOgPoMhCv6J2hY9XoESdOhxTm/v4N/ZQcx4BtqKw39Flshz3MNJvICFnjEm
+ynlA3m9Pg59dI38qlMFaMSBDlpMrEpLr6nPq+QdpJgOqFvonVkgVYrAPMCuSCnIm
+WZZ07RGPV+Lr72riY2N6HVWwulYKiXyDEKd2sPucHgtD9bNQ/w+E++9HyKauyTz+
+ohm4ljaw0YEi4UAiZnD5RwyQZhhAsBTrUvHtbkglPz1PImG3ogWr8OPuUXbFps2m
+L2RscXoHLgMrD6CSilb1mTR0BFsmaM+HqkmEh1nY9cELr8LpnG1GxC07v1AfJfg=
+=2DL5
-----END PGP SIGNATURE-----
diff --git a/sys-apps/portage/portage-2.2.12.ebuild b/sys-apps/portage/portage-2.2.12.ebuild
new file mode 100644
index 000000000000..ed5c9e78211c
--- /dev/null
+++ b/sys-apps/portage/portage-2.2.12.ebuild
@@ -0,0 +1,572 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.12.ebuild,v 1.1 2014/08/12 19:54:39 dolsen Exp $
+
+# Require EAPI 2 since we now require at least python-2.6 (for python 3
+# syntax support) which also requires EAPI 2.
+EAPI=2
+PYTHON_COMPAT=(
+ pypy
+ python3_2 python3_3 python3_4
+ python2_7
+)
+inherit eutils multilib
+
+DESCRIPTION="Portage is the package management and distribution system for Gentoo"
+HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+SLOT="0"
+IUSE="build doc epydoc +ipc linguas_ru pypy python2 python3 selinux xattr"
+
+for _pyimpl in ${PYTHON_COMPAT[@]} ; do
+ IUSE+=" python_targets_${_pyimpl}"
+done
+unset _pyimpl
+
+python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
+ !pypy? ( !python2? ( !python3? (
+ >=dev-lang/python-2.7[ssl]
+ ) ) )
+ pypy? ( !python2? ( !python3? ( virtual/pypy:0[bzip2] ) ) )
+ python2? ( !python3? ( dev-lang/python:2.7[ssl] ) )"
+python_dep="${python_dep_ssl//\[ssl\]}"
+python_dep="${python_dep//,ssl}"
+python_dep="${python_dep//ssl,}"
+
+python_dep="${python_dep}
+ python_targets_pypy? ( virtual/pypy:0 )
+ python_targets_python2_7? ( dev-lang/python:2.7 )
+ python_targets_python3_2? ( dev-lang/python:3.2 )
+ python_targets_python3_3? ( dev-lang/python:3.3 )
+ python_targets_python3_4? ( dev-lang/python:3.4 )
+"
+
+# The pysqlite blocker is for bug #282760.
+# make-3.82 is for bug #455858
+DEPEND="${python_dep}
+ >=sys-devel/make-3.82
+ >=sys-apps/sed-4.0.5 sys-devel/patch
+ doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
+ epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
+# Require sandbox-2.2 for bug #288863.
+# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
+# quite slow, so it's not considered in the dependencies as an alternative to
+# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
+# for now, don't pull in xattr deps for other kernels.
+# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
+# For compgen, require bash[readline] (bug #445576).
+RDEPEND="${python_dep}
+ !build? ( >=sys-apps/sed-4.0.5
+ || ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
+ >=app-admin/eselect-1.2
+ || ( ${python_dep_ssl} dev-python/python-mhash )
+ )
+ elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
+ elibc_glibc? ( >=sys-apps/sandbox-2.2 )
+ elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
+ >=app-misc/pax-utils-0.1.17
+ selinux? ( >=sys-libs/libselinux-2.0.94[python] )
+ xattr? ( kernel_linux? (
+ >=sys-apps/install-xattr-0.3
+ $(for python_impl in python{2_7,3_2} pypy; do
+ echo "python_targets_${python_impl}? ( dev-python/pyxattr[python_targets_${python_impl}] )"
+ done) ) )
+ !<app-shells/bash-3.2_p17
+ !<app-admin/logrotate-3.8.0"
+PDEPEND="
+ !build? (
+ >=net-misc/rsync-2.6.4
+ userland_GNU? ( >=sys-apps/coreutils-6.4 )
+ )"
+# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
+# NOTE: FEATURES=installsources requires debugedit and rsync
+
+SRC_ARCHIVES="http://dev.gentoo.org/~dolsen/releases/portage"
+
+prefix_src_archives() {
+ local x y
+ for x in ${@}; do
+ for y in ${SRC_ARCHIVES}; do
+ echo ${y}/${x}
+ done
+ done
+}
+
+PV_PL="2.1.2"
+PATCHVER_PL=""
+TARBALL_PV=${PV}
+SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
+ $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
+
+PATCHVER=
+[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
+if [ -n "${PATCHVER}" ]; then
+ SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
+ $(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
+fi
+
+S="${WORKDIR}"/${PN}-${TARBALL_PV}
+S_PL="${WORKDIR}"/${PN}-${PV_PL}
+
+compatible_python_is_selected() {
+ [[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
+}
+
+current_python_has_xattr() {
+ [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
+ local PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
+ [[ $("${PYTHON}" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
+ "${PYTHON}" -c 'import xattr' 2>/dev/null
+}
+
+call_with_python_impl() {
+ [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
+ env EPYTHON=${EPYTHON} "$@"
+}
+
+get_python_interpreter() {
+ [ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
+ local impl=$1 python
+ case "${impl}" in
+ python*)
+ python=${impl/_/.}
+ ;;
+ pypy)
+ python=${impl}
+ ;;
+ *)
+ die "Unrecognized python target: ${impl}"
+ esac
+ echo ${python}
+}
+
+get_python_sitedir() {
+ [ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
+ local impl=$1
+ local site_dir=usr/$(get_libdir)/${impl/_/.}/site-packages
+ [[ -d ${EROOT:-${ROOT}}${site_dir} ]] || \
+ ewarn "site-packages dir missing for ${impl}: ${EROOT:-${ROOT}}${site_dir}"
+ echo "/${site_dir}"
+}
+
+python_compileall() {
+ [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
+ local d=${EPREFIX}$1 PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
+ local d_image=${D}${d#/}
+ [[ -d ${d_image} ]] || die "directory does not exist: ${d_image}"
+ case "${EPYTHON}" in
+ python*)
+ "${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
+ # Note: Using -OO breaks emaint, since it requires __doc__,
+ # and __doc__ is None when -OO is used.
+ "${PYTHON}" -O -m compileall -q -f -d "${d}" "${d_image}" || die
+ ;;
+ pypy)
+ "${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
+ ;;
+ *)
+ die "Unrecognized EPYTHON value: ${EPYTHON}"
+ esac
+}
+
+pkg_setup() {
+ if use python2 && use python3 ; then
+ ewarn "Both python2 and python3 USE flags are enabled, but only one"
+ ewarn "can be in the shebangs. Using python3."
+ fi
+ if use pypy && use python3 ; then
+ ewarn "Both pypy and python3 USE flags are enabled, but only one"
+ ewarn "can be in the shebangs. Using python3."
+ fi
+ if use pypy && use python2 ; then
+ ewarn "Both pypy and python2 USE flags are enabled, but only one"
+ ewarn "can be in the shebangs. Using python2"
+ fi
+ if ! use pypy && ! use python2 && ! use python3 && \
+ ! compatible_python_is_selected ; then
+ ewarn "Attempting to select a compatible default python interpreter"
+ local x success=0
+ for x in "${EPREFIX}"/usr/bin/python2.* ; do
+ x=${x#${EPREFIX}/usr/bin/python2.}
+ if [[ $x -ge 6 ]] 2>/dev/null ; then
+ eselect python set python2.$x
+ if compatible_python_is_selected ; then
+ elog "Default python interpreter is now set to python-2.$x"
+ success=1
+ break
+ fi
+ fi
+ done
+ if [ $success != 1 ] ; then
+ eerror "Unable to select a compatible default python interpreter!"
+ die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
+ fi
+ fi
+
+ # We use EPYTHON to designate the active python interpreter,
+ # but we only export when needed, via call_with_python_impl.
+ EPYTHON=python
+ export -n EPYTHON
+ if use python3; then
+ EPYTHON=python3
+ elif use python2; then
+ EPYTHON=python2
+ elif use pypy; then
+ EPYTHON=pypy
+ fi
+}
+
+src_prepare() {
+ if [ -n "${PATCHVER}" ] ; then
+ if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
+ rm "$S/bin/ebuild-helpers/portageq" \
+ || die "failed to remove portageq helper symlink"
+ fi
+ epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
+ fi
+ einfo "Setting portage.VERSION to ${PVR} ..."
+ sed -e "s/^VERSION = .*/VERSION = \"${PVR}\"/" -i pym/portage/__init__.py || \
+ die "Failed to patch portage.VERSION"
+ sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
+ die "Failed to patch VERSION in doc/fragment/version"
+ sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
+ die "Failed to patch VERSION in man page headers"
+
+ if ! use ipc ; then
+ einfo "Disabling ipc..."
+ sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
+ -i pym/_emerge/AbstractEbuildProcess.py || \
+ die "failed to patch AbstractEbuildProcess.py"
+ fi
+
+ if use xattr && use kernel_linux ; then
+ einfo "Adding FEATURES=xattr to make.globals ..."
+ echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
+ || die "failed to append to make.globals"
+ fi
+
+ local set_shebang=
+ if use python3; then
+ set_shebang=python3
+ elif use python2; then
+ set_shebang=python2
+ elif use pypy; then
+ set_shebang=pypy
+ fi
+ if [[ -n ${set_shebang} ]] ; then
+ einfo "Converting shebangs for ${set_shebang}..."
+ while read -r -d $'\0' ; do
+ local shebang=$(head -n1 "$REPLY")
+ if [[ ${shebang} == "#!/usr/bin/python"* ]] ; then
+ sed -i -e "1s:python:${set_shebang}:" "$REPLY" || \
+ die "sed failed"
+ fi
+ done < <(find . -type f -print0)
+ fi
+
+ if [[ -n ${EPREFIX} ]] ; then
+ einfo "Setting portage.const.EPREFIX ..."
+ sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
+ -i pym/portage/const.py || \
+ die "Failed to patch portage.const.EPREFIX"
+
+ einfo "Prefixing shebangs ..."
+ while read -r -d $'\0' ; do
+ local shebang=$(head -n1 "$REPLY")
+ if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
+ sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
+ die "sed failed"
+ fi
+ done < <(find . -type f -print0)
+
+ einfo "Adjusting make.globals ..."
+ sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \
+ -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \
+ -i cnf/make.globals || die "sed failed"
+
+ einfo "Adjusting repos.conf ..."
+ sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
+ -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
+ -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
+ -e "s|^\(sync-uri = \).*|\\1rsync://prefix.gentooexperimental.org/gentoo-portage-prefix|" \
+ -i cnf/repos.conf || die "sed failed"
+
+ einfo "Adding FEATURES=force-prefix to make.globals ..."
+ echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
+ || die "failed to append to make.globals"
+ fi
+
+ cd "${S}/cnf" || die
+ if [ -f "make.conf.example.${ARCH}".diff ]; then
+ patch make.conf.example "make.conf.example.${ARCH}".diff || \
+ die "Failed to patch make.conf.example"
+ else
+ eerror ""
+ eerror "Portage does not have an arch-specific configuration for this arch."
+ eerror "Please notify the arch maintainer about this issue. Using generic."
+ eerror ""
+ fi
+}
+
+src_compile() {
+ if use doc; then
+ call_with_python_impl \
+ emake docbook || die
+ fi
+
+ if use epydoc; then
+ einfo "Generating api docs"
+ call_with_python_impl \
+ emake epydoc || die
+ fi
+}
+
+src_test() {
+ # make files executable, in case they were created by patch
+ find bin -type f | xargs chmod +x
+ call_with_python_impl \
+ emake test || die
+}
+
+src_install() {
+ call_with_python_impl \
+ emake DESTDIR="${D}" \
+ sysconfdir="${EPREFIX}/etc" \
+ prefix="${EPREFIX}/usr" \
+ install || die
+
+ # Use dodoc for compression, since the Makefile doesn't do that.
+ dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
+
+ # Allow external portage API consumers to import portage python modules
+ # (this used to be done with PYTHONPATH setting in /etc/env.d).
+ # For each of PYTHON_TARGETS, install a tree of *.py symlinks in
+ # site-packages, and compile with the corresponding interpreter.
+ local impl files mod_dir dest_mod_dir python relative_path x
+ for impl in "${PYTHON_COMPAT[@]}" ; do
+ use "python_targets_${impl}" || continue
+ if use build && [[ ${ROOT} == / &&
+ ! -x ${EPREFIX}/usr/bin/$(get_python_interpreter ${impl}) ]] ; then
+ # Tolerate --nodeps at beginning of stage1 for catalyst
+ ewarn "skipping python_targets_${impl}, interpreter not found"
+ continue
+ fi
+ while read -r mod_dir ; do
+ cd "${ED:-${D}}usr/lib/portage/pym/${mod_dir}" || die
+ files=$(echo *.py)
+ if [ -z "${files}" ] || [ "${files}" = "*.py" ]; then
+ # __pycache__ directories contain no py files
+ continue
+ fi
+ dest_mod_dir=$(get_python_sitedir ${impl})/${mod_dir}
+ dodir "${dest_mod_dir}" || die
+ relative_path=../../../lib/portage/pym/${mod_dir}
+ x=/${mod_dir}
+ while [ -n "${x}" ] ; do
+ relative_path=../${relative_path}
+ x=${x%/*}
+ done
+ for x in ${files} ; do
+ dosym "${relative_path}/${x}" \
+ "${dest_mod_dir}/${x}" || die
+ done
+ done < <(cd "${ED:-${D}}"usr/lib/portage/pym || die ; find * -type d ! -path "portage/tests*")
+ cd "${S}" || die
+ EPYTHON=$(get_python_interpreter ${impl}) \
+ python_compileall "$(get_python_sitedir ${impl})"
+ done
+
+ # Compile /usr/lib/portage/pym with the active interpreter, since portage
+ # internal commands force this directory to the beginning of sys.path.
+ python_compileall /usr/lib/portage/pym
+}
+
+pkg_preinst() {
+ if [[ $ROOT == / ]] ; then
+ # Run some minimal tests as a sanity check.
+ local test_runner=$(find "${ED:-${D}}" -name runTests)
+ if [[ -n $test_runner && -x $test_runner ]] ; then
+ einfo "Running preinst sanity tests..."
+ "$test_runner" || die "preinst sanity tests failed"
+ fi
+ fi
+
+ if use xattr && ! current_python_has_xattr ; then
+ ewarn "For optimal performance in xattr handling, install"
+ ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
+ ewarn "enable USE=python3 for $CATEGORY/$PN."
+ fi
+
+ # elog dir must exist to avoid logrotate error for bug #415911.
+ # This code runs in preinst in order to bypass the mapping of
+ # portage:portage to root:root which happens after src_install.
+ keepdir /var/log/portage/elog
+ # This is allowed to fail if the user/group are invalid for prefix users.
+ if chown portage:portage "${ED:-${D}}"var/log/portage{,/elog} 2>/dev/null ; then
+ chmod g+s,ug+rwx "${ED:-${D}}"var/log/portage{,/elog}
+ fi
+
+ # If portage-2.1.6 is installed and the preserved_libs_registry exists,
+ # assume that the NEEDED.ELF.2 files have already been generated.
+ has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
+ ! { [ -e "${EROOT:-${ROOT}}"var/lib/portage/preserved_libs_registry ] && \
+ has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ; } \
+ && NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false
+
+ if has_version "<${CATEGORY}/${PN}-2.1.13" || \
+ {
+ has_version ">=${CATEGORY}/${PN}-2.2_rc0" && \
+ has_version "<${CATEGORY}/${PN}-2.2.0_alpha189"
+ } ; then
+ USERPRIV_UPGRADE=true
+ USERSYNC_UPGRADE=true
+ REPOS_CONF_UPGRADE=true
+ REPOS_CONF_SYNC=
+ type -P portageq >/dev/null 2>&1 && \
+ REPOS_CONF_SYNC=$("$(type -P portageq)" envvar SYNC)
+ else
+ USERPRIV_UPGRADE=false
+ USERSYNC_UPGRADE=false
+ REPOS_CONF_UPGRADE=false
+ fi
+}
+
+get_ownership() {
+ case ${USERLAND} in
+ BSD)
+ stat -f '%Su:%Sg' "${1}"
+ ;;
+ *)
+ stat -c '%U:%G' "${1}"
+ ;;
+ esac
+}
+
+new_config_protect() {
+ # Generate a ._cfg file even if the target file
+ # does not exist, ensuring that the user will
+ # notice the config change.
+ local basename=${1##*/}
+ local dirname=${1%/*}
+ local i=0
+ while true ; do
+ local filename=$(
+ echo -n "${dirname}/._cfg"
+ printf "%04d" ${i}
+ echo -n "_${basename}"
+ )
+ [[ -e ${filename} ]] || break
+ (( i++ ))
+ done
+ echo "${filename}"
+}
+
+pkg_postinst() {
+
+ if ${REPOS_CONF_UPGRADE} ; then
+ einfo "Generating repos.conf"
+ local repo_name=
+ [[ -f ${PORTDIR}/profiles/repo_name ]] && \
+ repo_name=$(< "${PORTDIR}/profiles/repo_name")
+ if [[ -z ${REPOS_CONF_SYNC} ]] ; then
+ REPOS_CONF_SYNC=$(grep "^sync-uri =" "${EROOT:-${ROOT}}usr/share/portage/config/repos.conf")
+ REPOS_CONF_SYNC=${REPOS_CONF_SYNC##* }
+ fi
+ local sync_type=
+ [[ ${REPOS_CONF_SYNC} == git://* ]] && sync_type=git
+
+ if [[ ${REPOS_CONF_SYNC} == cvs://* ]]; then
+ sync_type=cvs
+ REPOS_CONF_SYNC=${REPOS_CONF_SYNC#cvs://}
+ fi
+
+ cat <<-EOF > "${T}/repos.conf"
+ [DEFAULT]
+ main-repo = ${repo_name:-gentoo}
+
+ [${repo_name:-gentoo}]
+ location = ${PORTDIR:-${EPREFIX}/usr/portage}
+ sync-type = ${sync_type:-rsync}
+ sync-uri = ${REPOS_CONF_SYNC}
+ EOF
+
+ [[ ${sync_type} == cvs ]] && echo "sync-cvs-repo = $(<"${PORTDIR}/CVS/Repository")" >> "${T}/repos.conf"
+
+ local dest=${EROOT:-${ROOT}}etc/portage/repos.conf
+ if [[ ! -f ${dest} ]] && mkdir -p "${dest}" 2>/dev/null ; then
+ dest=${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf
+ fi
+ # Don't install the config update if the desired repos.conf directory
+ # and config file exist, since users may accept it blindly and break
+ # their config (bug #478726).
+ [[ -e ${EROOT:-${ROOT}}etc/portage/repos.conf/${repo_name:-gentoo}.conf ]] || \
+ mv "${T}/repos.conf" "$(new_config_protect "${dest}")"
+
+ if [[ ${PORTDIR} == ${EPREFIX}/usr/portage ]] ; then
+ einfo "Generating make.conf PORTDIR setting for backward compatibility"
+ for dest in "${EROOT:-${ROOT}}etc/make.conf" "${EROOT:-${ROOT}}etc/portage/make.conf" ; do
+ [[ -e ${dest} ]] && break
+ done
+ [[ -d ${dest} ]] && dest=${dest}/portdir.conf
+ rm -rf "${T}/make.conf"
+ [[ -f ${dest} ]] && cat "${dest}" > "${T}/make.conf"
+ cat <<-EOF >> "${T}/make.conf"
+
+ # Set PORTDIR for backward compatibility with various tools:
+ # gentoo-bashcomp - bug #478444
+ # euse - bug #474574
+ # euses and ufed - bug #478318
+ PORTDIR="${EPREFIX}/usr/portage"
+ EOF
+ mkdir -p "${dest%/*}"
+ mv "${T}/make.conf" "$(new_config_protect "${dest}")"
+ fi
+ fi
+
+ if ${NEEDED_REBUILD_UPGRADE} ; then
+ einfo "rebuilding NEEDED.ELF.2 files"
+ local cpv filename line newline
+ for cpv in "${EROOT:-${ROOT}}var/db/pkg"/*/*; do
+ [[ -f "${cpv}/NEEDED" && ! -f "${cpv}/NEEDED.ELF.2" ]] || continue
+ while read -r line; do
+ filename=${line% *}
+ newline=$(scanelf -BF "%a;%F;%S;%r;%n" "${ROOT%/}${filename}")
+ newline=${newline// - }
+ [[ ${#ROOT} -gt 1 ]] && newline=${newline/${ROOT%/}}
+ echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
+ done < "${cpv}/NEEDED"
+ done
+ fi
+
+ local distdir=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}
+
+ if ${USERSYNC_UPGRADE} && \
+ [[ -d ${PORTDIR} && -w ${PORTDIR} ]] ; then
+ local ownership=$(get_ownership "${PORTDIR}")
+ if [[ -n ${ownership} ]] ; then
+ einfo "Adjusting PORTDIR permissions for usersync"
+ find "${PORTDIR}" -path "${distdir%/}" -prune -o \
+ ! \( -user "${ownership%:*}" -a -group "${ownership#*:}" \) \
+ -exec chown "${ownership}" {} +
+ fi
+ fi
+
+ # Do this last, since it could take a long time if there
+ # are lots of live sources, and the user may be tempted
+ # to kill emerge while it is running.
+ if ${USERPRIV_UPGRADE} && \
+ [[ -d ${distdir} && -w ${distdir} ]] ; then
+ local ownership=$(get_ownership "${distdir}")
+ if [[ ${ownership#*:} == portage ]] ; then
+ einfo "Adjusting DISTDIR permissions for userpriv"
+ find "${distdir}" -mindepth 1 -maxdepth 1 -type d -uid 0 \
+ -exec chown -R portage:portage {} +
+ fi
+ fi
+}