summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2013-04-28 18:39:22 +0000
committerZac Medico <zmedico@gentoo.org>2013-04-28 18:39:22 +0000
commitcde99979eaf16ab2e82fc459e64aa66d80da5975 (patch)
tree6507580584c1d2c80ed8d19925831ef5e9aef4e0 /sys-apps
parentrebump to EAPI5 to use subslot deps (diff)
downloadhistorical-cde99979eaf16ab2e82fc459e64aa66d80da5975.tar.gz
historical-cde99979eaf16ab2e82fc459e64aa66d80da5975.tar.bz2
historical-cde99979eaf16ab2e82fc459e64aa66d80da5975.zip
Migrate off of python.eclass.
Package-Manager: portage-2.2.0_alpha173/cvs/Linux i686 Manifest-Sign-Key: 0xFDE8EF85AE5719A3
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/portage/ChangeLog6
-rw-r--r--sys-apps/portage/Manifest12
-rw-r--r--sys-apps/portage/portage-2.1.11.55.ebuild75
-rw-r--r--sys-apps/portage/portage-2.1.6.7_p1.ebuild15
4 files changed, 70 insertions, 38 deletions
diff --git a/sys-apps/portage/ChangeLog b/sys-apps/portage/ChangeLog
index 5d37da49b3f8..dc71d3d5ffa8 100644
--- a/sys-apps/portage/ChangeLog
+++ b/sys-apps/portage/ChangeLog
@@ -1,6 +1,10 @@
# 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.1259 2013/04/27 21:57:26 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1260 2013/04/28 18:39:20 zmedico Exp $
+
+ 28 Apr 2013; Zac Medico <zmedico@gentoo.org> portage-2.1.11.55.ebuild,
+ portage-2.1.6.7_p1.ebuild:
+ Migrate off of python.eclass.
27 Apr 2013; Zac Medico <zmedico@gentoo.org> -portage-2.1.11.52.ebuild,
-portage-2.2.0_alpha166.ebuild:
diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
index 2f4b17e6bb1c..c7d8094635e2 100644
--- a/sys-apps/portage/Manifest
+++ b/sys-apps/portage/Manifest
@@ -10,18 +10,18 @@ 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-man-pl-2.1.2.tar.bz2 53893 SHA256 960eaa7c6f3a2af44bdc665266a8e884628a562373cc477d301597ecc5ef961f SHA512 5f5c8dd1559048546633b1e7291ff8c0f5d637595f1a4c98405424b08c30c089fc9359e0214f78fbe358754f20d327794f4692b9b67639585c29b755975ee853 WHIRLPOOL 756e267b84077501d976f46fa448cda5368cd52aeca6ec43d109c81fe8e2364e0cd0f35630d68a4186c70e3b440b7c870b86ac7ef83cc0afa43e10f9f8e1f422
-EBUILD portage-2.1.11.55.ebuild 9574 SHA256 7d6a5efe8f3068ff24da5c6afd42ea349e218508f49ddde2f454c4fdbdb227ef SHA512 71a953cbba4426017503fdeba84e3b130994f1451a94b18b6d9a9ec21683034176c9f20df7889a8e338df8126828cea1064ad7812adc401a3487ae892ea72864 WHIRLPOOL 07cc6b38801c647587fd65b417517dea682ebaa37ae1c5d8a39c7c08385cb93067cd5e6d2dc7272264d1195453f37838718544f951393c0b117367920469694b
+EBUILD portage-2.1.11.55.ebuild 10561 SHA256 96aea2c66f6b40da539e1169154338bfe117cf4ceefca544189c979bd610a7ab SHA512 0ace12e68af49972fcaaab13b621496c4f3b763826410ae56931310c2fa9e989d823ee02113e14f5238ec2e385169c8757b9ed6adbbcdcbbd325b6f8a39717df WHIRLPOOL 31c393cbf89b4f0a9c1fce372c5dde70f4b00861e4251a52792794211485bf275204200a1a858c5bc8db563428a69e27ab846cbc2049b2c119acc594003a5fb5
EBUILD portage-2.1.11.62.ebuild 13160 SHA256 45edaf5657c15bfd8817e6c5ef472329bf3f838a9b494e85ab02419a3f3dc28a SHA512 294f95d3bf9469494826d9dd3fc3716cfcd8372c346c1eba95f66af74ea13c88c9e430a199e581a2f2a872df91b1192b7cf34bbf910b1dae1e547bb5fde196c7 WHIRLPOOL 8eebfb2eb0eba1de3c5e2dff83865e85715966ebf0ae12704fe2f4b6f2730a85f3345073ca8430693bd7976015ac823bc0ee5b09e8918bed44ef95fd68126f28
-EBUILD portage-2.1.6.7_p1.ebuild 8391 SHA256 0acf62784db52a5aead66cc1dee673a9d4d832bae97881c7346864d33a03e167 SHA512 a5f148f4bf7a9b44d9a72ef03b926a5c5bee8acae54c681950094a7ebfc06d74850dab2efa7b98e76afcc773daef9da788d0923c5d5c6b3e211c93f419194b87 WHIRLPOOL 9006f575b6a5f3b34bba04e4a61507b766dd81b151ce3bf32a2f5ba965bb8a5ffeba0e06f7b8e835c8886d05ec18ca1434c8462e18d91784b7409d627e3e3126
+EBUILD portage-2.1.6.7_p1.ebuild 8362 SHA256 6be861ce5b12d79387b8970d78818371bb87f7f64d9e8b0cde06a4b0506f7ea7 SHA512 81c8382a826a65e96608d7f3dc8b2f6901e7518757d0f2375bfe2847cea8398c0f9bc6fac70eb44a17ad38fabba3bd1a05ac56433e178e3974f3412f4dccd831 WHIRLPOOL 33333059c1dadca596134a0cea382aee44a529dcadaffcf26f3e0b0a709eafce84a3725b4306070ac87ffa197f6f4082f2eddb171747bc0972bfc141458f6327
EBUILD portage-2.2.0_alpha173.ebuild 15327 SHA256 78d95fd85f3902b9874f78756fd49b31f28f95c56fdd667aace5f5458f6a304f SHA512 fd7c12306815d8ff9f1a89d9b0780f2913781d651b756fce1864b7d7cd0736565c36d0f298538ea2c7e5033d9436d2e5d072718e39abd985e43f28a0b68ef259 WHIRLPOOL 4e884c2b137d45163144f958461d0fb91271ce7965e3d7d6ba46f13b0b9a071d8884d40ef12c9b1ccd3ac2e19df19e992e8bbacfad5798aaad846844ab7cf51e
EBUILD portage-9999.ebuild 14559 SHA256 669df9f23a4f17297cb1fb92b2f32d9e6d31de3e1dd3b2b9dcf95acaf37427d5 SHA512 b6c26b56f1ce39ab1b0ffee9da9ecc0af9a99dea49980386f3ff158594a2c97a8cd7e53e3bc32e88c74134d8510d9a759696129778dc39c6eef7519c93e99fc0 WHIRLPOOL bb51e7a51404cb759a1fce327d4dda33ab15f7970db622d8504500598d113b11a46349c7b220243d5bb1888b6d08af98394600fe56ff91f628edfe2059307a83
-MISC ChangeLog 24931 SHA256 6fbeaab901e5bcda7fb476041136b2a0692149c2373e92b8ec59e064cc3ba67c SHA512 197c4fd7102795c2bc8b53c9ecad57a42ff2f2ae222e37712d004e862fa4615e43937bcc80bf9d3a97767e506d6accf4fe8d7c11009a03af5a04b2e83033570d WHIRLPOOL 7277b2e2fe11d38fa64f79fceec01a8f5b94fee75f697df7529441e09a8e8d1c78837be1735df36413274528d5c8c837115318ddc489e003bf4a9556f1ff5bb4
+MISC ChangeLog 25066 SHA256 94b7bd2cd6408f382377ad5dccab8205ae7aa53a4cba8f4fe86cce3492c69f97 SHA512 f78e6bd20990b70d8e533433f6552fa97ef36a61df9e2e68e31cd1d39c202fab41fd78ec279ad8c77bc6c229575e0004a4f26ad0c86177b1dc42679b92b95bb7 WHIRLPOOL 6d81d218e22c34152b84890f67c1d6989af043a35607c148d1f90a1607057bfe0b2b1fea533357505f2827976eb2596561dfc21c467f26827aefbf96c014eae0
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)
-iEYEAREIAAYFAlF8ScgACgkQ/ejvha5XGaPkDACfb4rb8JucVOt5cbk6WtFAw8mj
-yAYAoOWSHKKSlaEfh3ukDkM9FAaSkEGj
-=ie4i
+iEYEAREIAAYFAlF9bNoACgkQ/ejvha5XGaPRjACffzhj+HpLiA/SvCv1tlBh3T9O
+fcgAnj3Cg5QzBcCTXq9UW25b4gtGliaW
+=wIIS
-----END PGP SIGNATURE-----
diff --git a/sys-apps/portage/portage-2.1.11.55.ebuild b/sys-apps/portage/portage-2.1.11.55.ebuild
index ae16302b107a..6d0cd9bbbe31 100644
--- a/sys-apps/portage/portage-2.1.11.55.ebuild
+++ b/sys-apps/portage/portage-2.1.11.55.ebuild
@@ -1,11 +1,11 @@
# 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.11.55.ebuild,v 1.6 2013/03/28 13:30:58 josejx Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.11.55.ebuild,v 1.7 2013/04/28 18:39:20 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
-inherit eutils python
+inherit eutils
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
@@ -100,6 +100,31 @@ current_python_has_xattr() {
/usr/bin/python -c 'import xattr' 2>/dev/null
}
+call_with_python_impl() {
+ [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
+ env EPYTHON=${EPYTHON} "$@"
+}
+
+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"
@@ -134,12 +159,16 @@ pkg_setup() {
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
- python_set_active_version 3
+ EPYTHON=python3
elif use python2; then
- python_set_active_version 2
+ EPYTHON=python2
elif use pypy2_0; then
- python_set_active_version 2.7-pypy-2.0
+ EPYTHON=pypy-c2.0
fi
}
@@ -172,15 +201,23 @@ src_prepare() {
|| die "failed to append to make.globals"
fi
+ local set_shebang=
if use python3; then
- einfo "Converting shebangs for python3..."
- python_convert_shebangs -r 3 .
+ set_shebang=python3
elif use python2; then
- einfo "Converting shebangs for python2..."
- python_convert_shebangs -r 2 .
+ set_shebang=python2
elif use pypy2_0; then
- einfo "Converting shebangs for pypy-c2.0..."
- python_convert_shebangs -r 2.7-pypy-2.0 .
+ 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
@@ -197,20 +234,24 @@ src_prepare() {
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" \
@@ -233,6 +274,8 @@ src_install() {
echo "PYTHONPATH=\"/usr/lib/portage/pym\"" > \
"${T}/05portage" || die
doenvd "${T}/05portage" || die
+
+ python_compileall /usr/lib/portage/pym
}
pkg_preinst() {
@@ -268,13 +311,3 @@ pkg_preinst() {
ewarn "files that have not been modified since they were installed."
fi
}
-
-pkg_postinst() {
- # Compile all source files recursively. Any orphans
- # will be identified and removed in postrm.
- python_mod_optimize /usr/lib/portage/pym
-}
-
-pkg_postrm() {
- python_mod_cleanup /usr/lib/portage/pym
-}
diff --git a/sys-apps/portage/portage-2.1.6.7_p1.ebuild b/sys-apps/portage/portage-2.1.6.7_p1.ebuild
index 9191b9974e11..8dc8c7c3448e 100644
--- a/sys-apps/portage/portage-2.1.6.7_p1.ebuild
+++ b/sys-apps/portage/portage-2.1.6.7_p1.ebuild
@@ -1,8 +1,8 @@
# 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.6.7_p1.ebuild,v 1.6 2013/03/22 20:15:28 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.6.7_p1.ebuild,v 1.7 2013/04/28 18:39:20 zmedico Exp $
-inherit eutils multilib python
+inherit eutils multilib
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
@@ -205,6 +205,9 @@ src_install() {
dodir /etc/portage
keepdir /etc/portage
+
+ /usr/bin/python -m compileall -q -f -d "${portage_base}/pym" "${D%/}${portage_base}/pym" || die
+ /usr/bin/python -O -m compileall -q -f -d "${portage_base}/pym" "${D%/}${portage_base}/pym" || die
}
pkg_preinst() {
@@ -218,10 +221,6 @@ pkg_preinst() {
}
pkg_postinst() {
- # Compile all source files recursively. Any orphans
- # will be identified and removed in postrm.
- python_mod_optimize /usr/$(get_libdir)/portage/pym
-
local warning_shown=0
if [ $DOWNGRADE_FROM_2_2 = 0 ] ; then
ewarn
@@ -257,7 +256,3 @@ pkg_postinst() {
ewarn # for symmetry
fi
}
-
-pkg_postrm() {
- python_mod_cleanup /usr/$(get_libdir)/portage/pym
-}