diff options
author | Zac Medico <zmedico@gentoo.org> | 2013-06-16 01:45:32 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2013-06-16 01:45:32 +0000 |
commit | 0b7c4d43c27de05674e2035566b9907e4efc2f91 (patch) | |
tree | 70861302e220d819196fd7b265db8cde01573444 /sys-apps | |
parent | Add new libc: sys-libs/musl (diff) | |
download | historical-0b7c4d43c27de05674e2035566b9907e4efc2f91.tar.gz historical-0b7c4d43c27de05674e2035566b9907e4efc2f91.tar.bz2 historical-0b7c4d43c27de05674e2035566b9907e4efc2f91.zip |
2.1.12.5 version bump. This fixes emerge's blocker display to show more
information in some cases. Bug #472632 tracks all bugs fixed since
portage-2.1.12.2.
Package-Manager: portage-2.2.0_alpha180/cvs/Linux i686
Manifest-Sign-Key: 0xFDE8EF85AE5719A3
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/portage/ChangeLog | 9 | ||||
-rw-r--r-- | sys-apps/portage/Manifest | 10 | ||||
-rw-r--r-- | sys-apps/portage/portage-2.1.12.5.ebuild | 428 |
3 files changed, 442 insertions, 5 deletions
diff --git a/sys-apps/portage/ChangeLog b/sys-apps/portage/ChangeLog index 0786b6bd59fe..ff1bd9cb846e 100644 --- a/sys-apps/portage/ChangeLog +++ b/sys-apps/portage/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/portage # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1288 2013/06/15 01:47:26 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1289 2013/06/16 01:45:30 zmedico Exp $ + +*portage-2.1.12.5 (16 Jun 2013) + + 16 Jun 2013; Zac Medico <zmedico@gentoo.org> +portage-2.1.12.5.ebuild: + 2.1.12.5 version bump. This fixes emerge's blocker display to show more + information in some cases. Bug #472632 tracks all bugs fixed since + portage-2.1.12.2. 15 Jun 2013; Zac Medico <zmedico@gentoo.org> -portage-2.1.12.3.ebuild, -portage-2.2.0_alpha178.ebuild: diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest index 89fc13678c4f..b4aa5c23001c 100644 --- a/sys-apps/portage/Manifest +++ b/sys-apps/portage/Manifest @@ -5,6 +5,7 @@ AUX README.RESCUE 137 SHA256 69bea0c755eab59b6b4d90838b8551744f0b0c8eeac170b1cd1 DIST portage-2.1.11.62.tar.bz2 916085 SHA256 894bd50830264d222210f5417448263355830d5d8d2de446c1b6b3a4c7a14bfb SHA512 1a969c5164871ce12cc87014f69d44fc54c11a2c58d472fc0dfaa82e9561fbfeac442a3b8a0d5cccd39b117f762acfc0e7abcc00c2e16719940e93746a7c4ba7 WHIRLPOOL b681b290e98162ba7f770b4e5d63d5b42398ecd325629a166b158a6e3becd15de5bae8b4a5808612a5a9529683e544473f33d030f20838fb03086501b7e89cc2 DIST portage-2.1.12.2.tar.bz2 868695 SHA256 700cf7118d60aa14a2d759887e50988a3e527e04fe980100f25cc69357ae2437 SHA512 53bfbcad9743b2613501191f4883d0b99d1e99ca6fdff550996121cb47c7b8333837d825f6174cb82f83cc16069ebe66a0aba0cc7b13f86a65a055d961e2c70b WHIRLPOOL 736dcc71a323d83c7fd75aa9f5c047b0fe234c66545a1744a2d69ca1b15af4d9bc60d9dfb2f9e76f1645e4d9c061f86bc56f4beac4e146b5cef970198b9010f6 DIST portage-2.1.12.4.tar.bz2 871212 SHA256 f32f8c9b8919603df38d95085eeae0116bc65b27dab89671c4b1cae03594269e SHA512 84fca7038ea13bc5a9a7750c170910519263a347996f1dd96ae0bb23d38fb86a9bc1a416865359f8fc00c3db6e970432bd965c7a96e3b6380508805c5aea531d WHIRLPOOL 13e4a900df3a5859af560849f1136c4124705c3897335410b075fc4d0c952dbf599a985cf09ca50943af42d461e0c5c33633557aa632f069ed387cedc46b7d4e +DIST portage-2.1.12.5.tar.bz2 872395 SHA256 5921c2cae0424e8f187055fe84b74de1391413932016e6d137bc913da49f1ef3 SHA512 14bc6bfae572ed8e0a6a1d48a6bff5715f68427bb64bbd0d7b53e90854ca6c71b918a0e522fb1ea51567df120190befeca67d7adbec6c2773dae4645ffeaf9d3 WHIRLPOOL dfbe66c745b0fb43e2cc3824746202cbe1342427db4abe7bd0fd36170d4c399d50023e094bce66791c79bea934d14056b2abd2e801e8ab89ecbc6c9256a36a3d DIST portage-2.1.6.7.patch.bz2 50118 SHA256 5f0605b51a24d23703330b040d2f7154322284db3e0cefa7499002ff1fa733c0 SHA512 dd2acc1d436cad77cfc83c4dec79316763c1fb88d61b7702e8e47e6f31b2b9fe49e8a4cf4a947614a2acd6db2ef080ed8b4ae5fce9d9be29d7e218a0ec1576c0 WHIRLPOOL 050f923249fde7c4774a2a8a944889e4270a89b00441f1923c01ab0be38f107503e018d7ab7a7f42615e7e375f0f6c0eb3bdbf3ff4ce1ce226957238a729b1ee DIST portage-2.1.6.7_p1.patch.bz2 4741 SHA256 ddaae2ad8c01e6477bfe22e23a4da57eb9d079a27a17a08385d56fe2c49eec30 SHA512 39058d815827b340787d813515ed4fb8c52c4fb0caa12ae70c8a9a97b9ba16c2bf4177190cb7d1c508055ce8a7aaa390ba9b31642c7d74bfb4a14d729e720617 WHIRLPOOL 8eab9574ed2e6cabac593d93f8b6ff71465c01376e7eec4cf357c336b5ed3d4f3fb3521991148ba4e34ba00c56bec5534c98311167c03866812277a8d88b0494 DIST portage-2.1.6.tar.bz2 518771 SHA256 b1c507445b3858449c861568f477e1cfab8b2326ded906b852c5193fb3839647 SHA512 d035f84601802ecaea3c0edea037a783fec743733bd40895eb5bb8a220449eb24cf1e2623cbca2e378197caba63a833d8cc54f1e49d886266307288b0adcfbdc WHIRLPOOL 25b6a6e3810f428c630ec7a6dc3cf2cfbe6bfdf276553786e1436b2630532ab442186e427bc75f249a224c5171b508a92303ce352b07be1a8a4d805c568ec10f @@ -15,17 +16,18 @@ DIST portage-man-pl-2.1.2.tar.bz2 53893 SHA256 960eaa7c6f3a2af44bdc665266a8e8846 EBUILD portage-2.1.11.62.ebuild 13593 SHA256 04e9222038bd66b61ea43e1b31a033d8de541cb5f55ca6fd0b093e378278c010 SHA512 dcce3640c68f2e7d76c6f3467b3ff79b30711e60346728c2eed04fdf351ce7d6c3ea6ea7a67ea5a395b0bd4b378720161f3c5a20fd883b15b7f6f477cf62792b WHIRLPOOL a71351363a0505780d353e8a82b048916fe5dd4aa57df79fc9d5b87fe3927e65a02560150393811794abf49f7f024701ef5b98e2c25e28156b2b2d8be8d09ce4 EBUILD portage-2.1.12.2.ebuild 14494 SHA256 85037f1445802e54533e3836b044b9467451e6cd50eed996e853ab5ef8986d21 SHA512 a0adaa880f8a81a381e2ad50f101291dfac542615faa4ba580ecb981b3c94b3fa8fd654e2bcba7266361af52eec61553e9dce0c5c19619bae7e9691101e35147 WHIRLPOOL 6ffa02929b0e33c023aaaba58405e78e1a0168d19b6f837fbb4b6a5f8bafbfd06f392854367dd66ab7260141891b6f33cd76e0dfbe257531bec8c4ba8ab11ad3 EBUILD portage-2.1.12.4.ebuild 14508 SHA256 3656d23c575b74ffe9060e387768ae736624edf8425b1726f9be3f162b6ae30e SHA512 09e71b370d424aed419fefdbe35e89474620f9aa4f5850b4fa66163c9adecf9a6dedc371ec89b5ee82e90f81c385963b271a122ecbb323603d9a3b37be5e7b50 WHIRLPOOL d7234eaf9847540fda239f0ffb02e52a016ef443a6f077d4e1d22bbfb825bbc4ae402e78e5c8f1ec5003d70a015d6e3a80a290c4823eaf2c02237e571db0813d +EBUILD portage-2.1.12.5.ebuild 14508 SHA256 8184fc745de55592b3c19c63d17990d1b0051682725e80e1dc2cc75169dc1c46 SHA512 ea43738bf693bb48c0bc41b4c6c3eee281286320e27259bfaab3486a95805ace3d094932b403725cc9f520d322af72b6be22874609388974713ea514198a9542 WHIRLPOOL d08a504adb3790c93f225f0b034ebcad0ec5ae6e8c14ebcd32e4b557d9758f99e0a02a03a03aa9fd933e37943d2561a63e1976137fc8f346f6da62cd65e212fe EBUILD portage-2.1.6.7_p1.ebuild 8307 SHA256 d43a972b7100062b95b23cf6c2d26ac240799622e04f915c0df98beb51f33108 SHA512 79362e2a742d978f5636b25cbfe818c22d4b2926ca2092ee1624c23da4256a008048bc8aa1ba641b85e2dcb9cd7d80e6b3f0558a446aff4355065e41607d74ef WHIRLPOOL 8783d9d9a9a13333d3bd581ab84df36154ee1c4050494b46414603d65b7c50c2087a9a53a8dbcad99e626d69fe54f008e23eba8e649e269313d093be2dffac9a EBUILD portage-2.2.0_alpha177.ebuild 15628 SHA256 7369304a962d369d783fc65c6bec4c0437944ddd7709c8c272782baf8e912ca0 SHA512 41d7f2f8b2dace9406a8d89240ba4cd2dc149cb5d247df99180e4afd4a7ea297fb610fd845755f9aeb910e122ff74a5fe4b244f4a8a39606686f5b5a2577f292 WHIRLPOOL 3cff1a7c7edb3b42a7c223390f3f6fe7c390d7be2fd83966dd84849e676df3808ce3e19f84c3844fa15493cb9b5167138ea20c89495c70b86c25d9767ef9ee9b EBUILD portage-2.2.0_alpha179.ebuild 15628 SHA256 e9b98b3e18e35c2630059ab3de0a34f79e7dde07885bdc65b0c51c71517ec723 SHA512 154b59c3f4028446c53e0bafa08ba1c3b7cc07454c34b2d7b1323bf54a62ea2935fb9775becca26f8c33462bd94dd8c2a41db76f95664550681a7d05e5c2c55a WHIRLPOOL 1fb5088d3419129af2e3c6a14e1fdd93e85f09825c73494946700ccc44a8441dd71e55ea1dd4a30484bd1fa48d2a64d3cb2b4d4d1b52f1733808a932c85789c4 EBUILD portage-9999.ebuild 14860 SHA256 fa10372f49d0c73de513db773167c7b31f1863c5db2b65ec413e3b7c0981fa6f SHA512 ff406024ea90fc8256607c061bc467aafc6d0632b470f3ff1c667189813e85cd1a018b4638727419d04654201189a989c6721e011b8cc727e30cd2ae5e1a40cf WHIRLPOOL 95955aa90cf55613e54e87aa169e834f54db2c3228455caf6f0e69080256f7701f8b7cad2223ad584137dc6a98e18b3216f56087a8808833067a709bf993e2da -MISC ChangeLog 31271 SHA256 1197eb7349934f4b811ae7e62d83a263aa4aaf334bbbd84722bc848dcab5da3f SHA512 6839989f858e1003a89505ed5ee33e9ffe5a47d4eb0b6437462eeb3a81cd24e8f693ec0088895d319ea9ac412dd92bef9dddba129adc4c90e7ef9b6bf4478949 WHIRLPOOL c2a0a81eb5f7598a94d1ac894f06b98b786da79aff34470cfa8fddbfcfe4a33603daea59e98a649366c358acd778bec9352a6072ea2865b81347ac643b97372a +MISC ChangeLog 31541 SHA256 c07dc684bee9ec7e8c8ce81f13346c59142f6fb8277daacdd6e58785abe21857 SHA512 b42c025168d4e25a3ea77aa76adb7979a63b8a893d9682b325e1aa6e876fb923c0ebef8100c16eebdc8ae403cae774d3a3350374d1823c509dc316efe69bb78c WHIRLPOOL 32b819d66e6685bebb8aa63edcedd75d02c1db4aab4cde1c6e3772165e3f0eeb56c9da645d2529a890a4aa99160d0e7d4ad52c329608b8854a1dc78334cda6aa MISC ChangeLog-2012 133873 SHA256 157a7eb13d4cf2e2c94bfcb7e91f218af1ea88f5ff20c24a50546950a9839c94 SHA512 1241f4ccd7b31bdd340649417257b0e95202992feb66e0cd4d41fc2d35bf0baeac19680f34a831d2fefce0c0fec03aa6e7a191f783e59cf9b93aaf266f010a3f WHIRLPOOL b027bdba0f5ccc1b3a2dc18df92d82b473af5e55536816b7177071c1ae1a89e4d50d42c2093fa1bbe28b92a42014fbefbfc9e7daa4e6426ebecbd5bffc3d479f MISC metadata.xml 926 SHA256 8736b6884463a876892a4fd45f6239a123c1229d2372ce47d5dff719f0eba2b9 SHA512 38d3c969b49012a94bfadecd1d48936513391a305eee5e5e55eb6c4a6b82e05b6ebf1dd6dfe6fbb5a96ba5fffc33fddcfda8d41f3d367ff4ad030859a655ef8b WHIRLPOOL 6f9afcacb628f75f84d03e812ed93b4e3613fcfc4e1180bcb0551c1c8025050ebd3b21fcdef79358aaad3606558345fcd6f914928eb62155e5b9a50bde0d3bf4 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) -iEYEAREIAAYFAlG7x68ACgkQ/ejvha5XGaPUMACfdSP0zJQ8de/rgGq5o12aWkJT -kGMAoNmCz8S+DCi7PWTUrAozFgWHW9W3 -=O8qX +iEYEAREIAAYFAlG9GLsACgkQ/ejvha5XGaMk0QCfaHC3k5fAINTGibPMX3WykdWj +xjoAn0mZpVrPfcg0pkyxjaoUr+/dftv5 +=jyoZ -----END PGP SIGNATURE----- diff --git a/sys-apps/portage/portage-2.1.12.5.ebuild b/sys-apps/portage/portage-2.1.12.5.ebuild new file mode 100644 index 000000000000..2347cfc26be4 --- /dev/null +++ b/sys-apps/portage/portage-2.1.12.5.ebuild @@ -0,0 +1,428 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.12.5.ebuild,v 1.1 2013/06/16 01:45:30 zmedico 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=( + pypy1_9 pypy2_0 + python3_1 python3_2 python3_3 python3_4 + python2_6 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 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +SLOT="0" +IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr" + +for _pyimpl in ${PYTHON_COMPAT[@]} ; do + IUSE+=" python_targets_${_pyimpl}" +done +unset _pyimpl + +# Import of the io module in python-2.6 raises ImportError for the +# thread module if threading is disabled. +python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] ) + !pypy2_0? ( !python2? ( !python3? ( + || ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] ) + ) ) ) + pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) ) + python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )" +python_dep="${python_dep_ssl//\[ssl\]}" +python_dep="${python_dep//,ssl}" +python_dep="${python_dep//ssl,}" + +python_dep="${python_dep} + python_targets_pypy1_9? ( dev-python/pypy:1.9 ) + python_targets_pypy2_0? ( dev-python/pypy:2.0 ) + python_targets_python2_6? ( dev-lang/python:2.6 ) + python_targets_python2_7? ( dev-lang/python:2.7 ) + python_targets_python3_1? ( dev-lang/python:3.1 ) + 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 + xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) ) + selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) ) + !<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/~zmedico/portage/archives" + +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) + linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2 + $(prefix_src_archives ${PN}-man-pl-${PV_PL}.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() { + [[ $(/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=/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/_/.} + python=${python/pypy/pypy-c} + ;; + *) + 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 ${ROOT}${site_dir} ]] || \ + ewarn "site-packages dir missing for ${impl}: ${ROOT}${site_dir}" + echo "${site_dir}" +} + +python_compileall() { + [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).' + local d=$1 PYTHON=/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 pypy2_0 && use python3 ; then + ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one" + ewarn "can be in the shebangs. Using python3." + fi + if use pypy2_0 && use python2 ; then + ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one" + ewarn "can be in the shebangs. Using python2" + fi + if ! use pypy2_0 && ! 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 /usr/bin/python2.* ; do + x=${x#/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 pypy2_0; then + EPYTHON=pypy-c2.0 + 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 pypy2_0; then + set_shebang=pypy-c2.0 + 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 + + cd "${S}/cnf" || die + if [ -f "make.conf.${ARCH}".diff ]; then + patch make.conf "make.conf.${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() { + call_with_python_impl \ + emake test || die +} + +src_install() { + call_with_python_impl \ + emake DESTDIR="${D}" \ + sysconfdir="/etc" \ + prefix="/usr" \ + install || die + + # Extended set config is currently disabled in portage-2.1.x. + rm -rf "${D}/usr/share/portage/config/sets" || die + + # Use dodoc for compression, since the Makefile doesn't do that. + dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die + + if use linguas_pl; then + doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die + doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die + fi + + # 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 /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 "${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 "${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 "$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 "${D}"var/log/portage{,/elog} 2>/dev/null ; then + chmod g+s,ug+rwx "${D}"var/log/portage{,/elog} + fi + + if [[ -d ${ROOT}var/log/portage && \ + $(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \ + has_version '<sys-apps/portage-2.1.10.11' ; then + # Initialize permissions for bug #378451 and bug #377177, since older + # portage does not create /var/log/portage with the desired default + # permissions. + einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451" + chown portage:portage "${ROOT}var/log/portage" + chmod g+ws "${ROOT}var/log/portage" + fi + + if has_version '<sys-apps/portage-2.1.10.61' ; then + ewarn "FEATURES=config-protect-if-modified is now enabled by default." + ewarn "This causes the CONFIG_PROTECT behavior to be skipped for" + ewarn "files that have not been modified since they were installed." + 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 "${ROOT}"var/lib/portage/preserved_libs_registry ] && \ + has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ; } \ + && NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false +} + +pkg_postinst() { + if ${NEEDED_REBUILD_UPGRADE} ; then + einfo "rebuilding NEEDED.ELF.2 files" + local cpv filename line newline + for cpv in "${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 +} |