summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2013-05-16 00:34:26 +0000
committerZac Medico <zmedico@gentoo.org>2013-05-16 00:34:26 +0000
commitf33218760a60bcccbb6a9001687a905e692f475f (patch)
tree9120ab21bb8486b34e47adf2a41c072a58afacbb /sys-apps
parent2.1.12 version bump. This fixes bug #469338 (use safe cwd for python-based (diff)
downloadhistorical-f33218760a60bcccbb6a9001687a905e692f475f.tar.gz
historical-f33218760a60bcccbb6a9001687a905e692f475f.tar.bz2
historical-f33218760a60bcccbb6a9001687a905e692f475f.zip
2.2.0_alpha175 version bump. This includes all of the fixes in 2.1.12.
Bug #210077 tracks all bugs fixed since portage-2.1.x. Package-Manager: portage-2.2.0_alpha175/cvs/Linux i686 Manifest-Sign-Key: 0xFDE8EF85AE5719A3
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/portage/ChangeLog9
-rw-r--r--sys-apps/portage/Manifest12
-rw-r--r--sys-apps/portage/portage-2.2.0_alpha175.ebuild452
-rw-r--r--sys-apps/portage/portage-9999.ebuild29
4 files changed, 478 insertions, 24 deletions
diff --git a/sys-apps/portage/ChangeLog b/sys-apps/portage/ChangeLog
index 5b3ab44338c7..afaf4a9d60bc 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.1265 2013/05/16 00:25:31 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1266 2013/05/16 00:34:25 zmedico Exp $
+
+*portage-2.2.0_alpha175 (16 May 2013)
+
+ 16 May 2013; Zac Medico <zmedico@gentoo.org> +portage-2.2.0_alpha175.ebuild,
+ portage-9999.ebuild:
+ 2.2.0_alpha175 version bump. This includes all of the fixes in 2.1.12. Bug
+ #210077 tracks all bugs fixed since portage-2.1.x.
*portage-2.1.12 (16 May 2013)
diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
index cf6ae2e83854..1ed73a3e2ff3 100644
--- a/sys-apps/portage/Manifest
+++ b/sys-apps/portage/Manifest
@@ -12,6 +12,7 @@ DIST portage-2.1.6.tar.bz2 518771 SHA256 b1c507445b3858449c861568f477e1cfab8b232
DIST portage-2.2.0_alpha170.tar.bz2 913726 SHA256 4b08d9c5369a14655cb4236d2ed0c4a2396e7b35f0bfb9447e9ecf741cca56a6 SHA512 4bfd6c5ddf46546bbd7f59dfd1f284682de8f72b20781e78334ebf83d1940f5e29d0f5d2f92a2784b3c21135ebeaadfaf847e3dbe73fa1ed8159026dcea5800e WHIRLPOOL ad245518ee685a5233dc01de9b215ce58bc0f22490383e144ec75e30388e7dc180b99975f00a25aabdfcf956707fe7f057353aa610ec9f37db24d30519430511
DIST portage-2.2.0_alpha173.patch.bz2 6958 SHA256 1c7fe7108e86387fbeb566c2277ca5fa28412820bf31148eee5efca028446007 SHA512 f21d2ae221bee21ee6120e3a1e804712f27ad874b1aa631be9bb4d7fcc8466a4fc158051567d91b1810cd77a5c350a90bb5bd7cf553f96769b7f9c1b2b96e982 WHIRLPOOL bd22135defd36703a0d14267d3265e9c9ea69e20114d2ef220e64841e7b4d6937d5063423306988e695ff450f71c4ed0f9ef9eb0e99db5f5d433cf3481c0875a
DIST portage-2.2.0_alpha174.patch.bz2 38028 SHA256 6bcfd191a64c6b7d541a894afe34e99b9f9feae4d81c36c3a1e32bf1afa9e398 SHA512 87be89536c110988ba0de667b101641e189c523c25142fda4249a7f635118c7b1bf8a7dade59abf684e863aee90af8712f47339e8a082a8ceb1b80d15e4cffe2 WHIRLPOOL 9312f52a8515a087e78de8d51d919b40918b931c0d30a689b61efffb8e56313c96a6d22dd200982acef8b934fc8ba8e5f5615eb549f06d40dd063c2d08daf044
+DIST portage-2.2.0_alpha175.tar.bz2 866662 SHA256 97976729bbdac82e790ec0691ccd15313a761db09cde2ae9d3504c4e925581c1 SHA512 278d9589e28c14d05c8ac139d5a822e0f7ae1ea068834450b3bcaf65e52af688833635a4bbf3bb279dc0af7f2c1706449d1d3b989722ac00b9f3d202fef1b8f0 WHIRLPOOL cc19445dd9368cb3ad2f37f23025b94117371eac00807337953d31e8deb299a933c3fc7a78c7f010a074ef6d6c01fbc0d53976b4ad9c23e7480873490851fd7e
DIST portage-man-pl-2.1.2.tar.bz2 53893 SHA256 960eaa7c6f3a2af44bdc665266a8e884628a562373cc477d301597ecc5ef961f SHA512 5f5c8dd1559048546633b1e7291ff8c0f5d637595f1a4c98405424b08c30c089fc9359e0214f78fbe358754f20d327794f4692b9b67639585c29b755975ee853 WHIRLPOOL 756e267b84077501d976f46fa448cda5368cd52aeca6ec43d109c81fe8e2364e0cd0f35630d68a4186c70e3b440b7c870b86ac7ef83cc0afa43e10f9f8e1f422
EBUILD portage-2.1.11.55.ebuild 10989 SHA256 686afe1b6f528ded33f914828b637ed0dec1983b3f7ed72485c918c0362af8c4 SHA512 1f815b9fc7bccec376065309455f63dd704b2388de996c1d36de15626c2f5e8e6c235cc9fcf8eb2eb0c8199f8a4d8b0a2e1ab17f2daa59da202eed22c129c950 WHIRLPOOL 8fed2d305ad930b345071149e901482d0210b0bcb9818773e3077a142f4f708ee3e704d0f00e49e4b7bc66333b22d1c16bb7ea60a78c26eec12939c683338d29
EBUILD portage-2.1.11.62.ebuild 13593 SHA256 04e9222038bd66b61ea43e1b31a033d8de541cb5f55ca6fd0b093e378278c010 SHA512 dcce3640c68f2e7d76c6f3467b3ff79b30711e60346728c2eed04fdf351ce7d6c3ea6ea7a67ea5a395b0bd4b378720161f3c5a20fd883b15b7f6f477cf62792b WHIRLPOOL a71351363a0505780d353e8a82b048916fe5dd4aa57df79fc9d5b87fe3927e65a02560150393811794abf49f7f024701ef5b98e2c25e28156b2b2d8be8d09ce4
@@ -20,14 +21,15 @@ EBUILD portage-2.1.12.ebuild 14506 SHA256 ba2d0fa057d2410e03a01646a4132ee43c31bb
EBUILD portage-2.1.6.7_p1.ebuild 8307 SHA256 d43a972b7100062b95b23cf6c2d26ac240799622e04f915c0df98beb51f33108 SHA512 79362e2a742d978f5636b25cbfe818c22d4b2926ca2092ee1624c23da4256a008048bc8aa1ba641b85e2dcb9cd7d80e6b3f0558a446aff4355065e41607d74ef WHIRLPOOL 8783d9d9a9a13333d3bd581ab84df36154ee1c4050494b46414603d65b7c50c2087a9a53a8dbcad99e626d69fe54f008e23eba8e649e269313d093be2dffac9a
EBUILD portage-2.2.0_alpha173.ebuild 15757 SHA256 bfed439e5e9ac00da13284eba8457e6a7dc2ecc4783bbeb753e509c0bde5fa1b SHA512 d86f4d9e2d6a20b8a6e418d7fa88dcd3d8b7db163cf9c10b28cf1f564031770b98f973bb1bb09bc4089041ddf14439af983248709e1e80d0bf8a019a0fef6eb3 WHIRLPOOL 6c3486077b4ff2b0e154146e7c32b76832adf24906266d1be146e0fa3ccb5d0de24e1e7c269521d59ffae43507336cf88bf1cdea2838d7dfde3aa2ae03c70d9b
EBUILD portage-2.2.0_alpha174.ebuild 15757 SHA256 7766dace1ed801c4788800921b5686d366572070c69fc312cdf957f765195fa9 SHA512 09d3f6c4d9a1a5b23bc45df462dfe1d88e31e60179e4c323e82bc6198ddb90f19ce92e96e6ef87d3bd119f19e44ed4e417769f70180b068a584b8eb3ec423a49 WHIRLPOOL e3ddcc72b00d96c91dd2b9d624bfe12ebbfecad0db74a4f14d325624559524500cd8c335c4330fb287307ce10a6d4dc2a1a17cd44a21f0841da33f52a2472e2e
-EBUILD portage-9999.ebuild 14989 SHA256 06e0295024c6aa32f933f02ca4f3172c9ce43dc8ed30cdd9053e6ff922ec46f7 SHA512 d9c95cf63065e3a847639d1ebbc89aeed4896143cbf0a30f9a503383d5ae5bba39ef2c3bcd622f180e07d83c9c55cf33cb1d130379c692c709677b463afed4ae WHIRLPOOL 0222e169cef35e982babcedb20246f59fc8a57dba690ca82298de5af233897ab014d0770c69d3880c7135ae6ce68671141255cdd132ae5ebd7334082c60fe7b1
-MISC ChangeLog 26697 SHA256 d404c079e06dbb66af9e469f9e4047435506f55096736acf5a55556e39480282 SHA512 a030886af82513e6a6aa2e3a63cc6566b7912064cc4eedfab122dee832c775c95717943a95d428350b5b00c963dbaf0164ef9eafdfc0d01019689e2820dc8a05 WHIRLPOOL 47bf2fb95936f5c43e7ae0a86d8b45c4eb6fe79d1d560fc5aa7c7759d9242237ab560c848e482e2da37f5b715185e70de0bedb42fa3bdfdb07318a658553fd6c
+EBUILD portage-2.2.0_alpha175.ebuild 15628 SHA256 e884be0f35d718b9a0931370867203bc8f9a535babfc4df689bb9a544c353e17 SHA512 dcd66401caf509cd07c3ad59239153bdca15cdb8224c8f269558c7c1079799fb96b199e88042e5e637bba87b7a5df124fbe037e6ce288a7e3f23ad5817dfd367 WHIRLPOOL 7d1754dc461bdd798cbca47198bcd0ebc56d7493aca0e895517c8670b03a29339dde4374840bc29fb45cd0e38d133145335801f64531f58c5a6c01baefa17405
+EBUILD portage-9999.ebuild 14858 SHA256 22e5058d78acddd05c2d1c6fde8cf81d419095018a196c1392e618729777c935 SHA512 88e91894fd58045f47392fc82e576920dd066ed564906ccd0ddb27843f0d7cd34ea9d02ef8239dd2016a5714ce4af4a3eb275b3c2bc78ba153dc2e269e81d701 WHIRLPOOL f5d2fb57a21d66eae5c2e4b72639023662fc1cd13a2794ccc92cde33eb81a261586d34a7b543c8a1fa0271c00f6a91c2731b9b9b488944e05683188ef73f1013
+MISC ChangeLog 26969 SHA256 84171eb02edbce5d0f5139501e77da8f793be81752d156edc52f60624caff1f6 SHA512 35ed7121ee4207d7f5636993cb4963693cee3cb6521dedafb00a25107a704bc8a929c95fd73cb26e1528065f17bcf92db7e3f30e18b551e9da1804fc7b32a960 WHIRLPOOL 755f920e04091b2aa6ce6260a2d557d1c8e9ff7408b3fa4e650fed140bf3ab88ade58594189bdb9a128489d25d0b3fa3a27abb9ae898f28e4348e96350a8fee7
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.19 (GNU/Linux)
-iEYEAREIAAYFAlGUJ34ACgkQ/ejvha5XGaNkAwCggSJeZQzgcbX8anOoy+CXXX5b
-tS0AnRBhxJL37rNZf779cBpJNp7j5xuw
-=cm6N
+iEYEAREIAAYFAlGUKZMACgkQ/ejvha5XGaMpKQCg2sYLLkNNdrpS6QIfk7+ZC4Cx
+JtkAn2n9XtdjZ8PjX62LJosK08jMzkmM
+=RS9a
-----END PGP SIGNATURE-----
diff --git a/sys-apps/portage/portage-2.2.0_alpha175.ebuild b/sys-apps/portage/portage-2.2.0_alpha175.ebuild
new file mode 100644
index 000000000000..70e12b553aeb
--- /dev/null
+++ b/sys-apps/portage/portage-2.2.0_alpha175.ebuild
@@ -0,0 +1,452 @@
+# 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.2.0_alpha175.ebuild,v 1.1 2013/05/16 00:34:25 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=3
+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="~amd64-fbsd ~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=2.2.0_alpha175
+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() {
+ [[ $("${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/_/.}
+ 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 ${EROOT}${site_dir} ]] || \
+ ewarn "site-packages dir missing for ${impl}: ${EROOT}${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 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 "${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 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
+
+ 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|^SYNC=.*|SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"|' \
+ -e "s|^\(PORTDIR=\)\(/usr/portage\)|\\1\"${EPREFIX}\\2\"|" \
+ -e "s|^\(PORTAGE_TMPDIR=\)\(/var/tmp\)|\\1\"${EPREFIX}\\2\"|" \
+ -i cnf/make.globals || 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.${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() {
+ # 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
+
+ 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 ${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}/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}"/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" -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}"var/log/portage{,/elog} 2>/dev/null ; then
+ chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
+ fi
+
+ has_version "<=${CATEGORY}/${PN}-2.2_pre5" \
+ && WORLD_MIGRATION_UPGRADE=true || WORLD_MIGRATION_UPGRADE=false
+
+ # 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}"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 $WORLD_MIGRATION_UPGRADE && \
+ grep -q "^@" "${EROOT}/var/lib/portage/world"; then
+ einfo "moving set references from the worldfile into world_sets"
+ cd "${EROOT}/var/lib/portage/"
+ grep "^@" world >> world_sets
+ sed -i -e '/^@/d' world
+ fi
+
+ if ${NEEDED_REBUILD_UPGRADE} ; then
+ einfo "rebuilding NEEDED.ELF.2 files"
+ local cpv filename line newline
+ for cpv in "${EROOT}/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
+}
diff --git a/sys-apps/portage/portage-9999.ebuild b/sys-apps/portage/portage-9999.ebuild
index 24c5427e71ca..a93e0d1bb1f2 100644
--- a/sys-apps/portage/portage-9999.ebuild
+++ b/sys-apps/portage/portage-9999.ebuild
@@ -1,6 +1,6 @@
# 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-9999.ebuild,v 1.75 2013/05/06 21:42:24 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-9999.ebuild,v 1.76 2013/05/16 00:34:25 zmedico Exp $
EAPI=3
PYTHON_COMPAT=(
@@ -286,9 +286,6 @@ src_prepare() {
|| die "failed to append to make.globals"
fi
- echo -e '\nFEATURES="${FEATURES} preserve-libs"' >> cnf/make.globals \
- || die "failed to append to make.globals"
-
cd "${S}/cnf" || die
if [ -f "make.conf.${ARCH}".diff ]; then
patch make.conf "make.conf.${ARCH}".diff || \
@@ -416,22 +413,18 @@ pkg_postinst() {
sed -i -e '/^@/d' world
fi
- if $NEEDED_REBUILD_UPGRADE ; then
+ if ${NEEDED_REBUILD_UPGRADE} ; then
einfo "rebuilding NEEDED.ELF.2 files"
+ local cpv filename line newline
for cpv in "${EROOT}/var/db/pkg"/*/*; do
- if [ -f "${cpv}/NEEDED" ]; then
- rm -f "${cpv}/NEEDED.ELF.2"
- while read line; do
- filename=${line% *}
- needed=${line#* }
- needed=${needed//+/++}
- needed=${needed//#/##}
- needed=${needed//%/%%}
- newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
- newline=${newline// - }
- echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
- done < "${cpv}/NEEDED"
- fi
+ [[ -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
}