summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2013-01-10 15:24:08 +0000
committerZac Medico <zmedico@gentoo.org>2013-01-10 15:24:08 +0000
commitd49233daeea528b655baba2c77676ad8485cc14c (patch)
treec24d6b4346e58c568b60dc82609c9eb38ed5c9f7 /sys-apps
parentStable for x86, wrt bug #449558 (diff)
downloadhistorical-d49233daeea528b655baba2c77676ad8485cc14c.tar.gz
historical-d49233daeea528b655baba2c77676ad8485cc14c.tar.bz2
historical-d49233daeea528b655baba2c77676ad8485cc14c.zip
2.1.11.39 version bump. This fixes bug #243192 (update quickpkg man page), bug #298298 (include packages from nested package sets in emerge --depclean summary), bug #446610 (handle syncfs return value), bug #446662 (add QA_CONFIGURE_OPTIONS), bug #448176 (fix emerge --keep-going to avoid dropping packages), bug #448858 (relocation error triggered by glibc upgrade), bug #449678 (silence repoman warning about usex for EAPI 5), bug #449708 (make use() fatal when called with unknown flags in EAPI 5), bug #450278 (add QA_AM_MAINTAINER_MODE), bug #450960 (mention relavant file names in autounmask messages), and bug #451118 (fix make.conf.5 formatting of compress-index docs). Bug #445274 tracks all bugs fixed since portage-2.1.11.31.
Package-Manager: portage-2.2.0_alpha150/cvs/Linux i686 Manifest-Sign-Key: 0xFDE8EF85AE5719A3
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/portage/ChangeLog17
-rw-r--r--sys-apps/portage/Manifest10
-rw-r--r--sys-apps/portage/portage-2.1.11.39.ebuild287
3 files changed, 308 insertions, 6 deletions
diff --git a/sys-apps/portage/ChangeLog b/sys-apps/portage/ChangeLog
index fc283a7d6cd8..e3f471bda906 100644
--- a/sys-apps/portage/ChangeLog
+++ b/sys-apps/portage/ChangeLog
@@ -1,9 +1,22 @@
# 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.1158 2013/01/01 13:38:34 dilfridge Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1159 2013/01/10 15:24:06 zmedico Exp $
+
+*portage-2.1.11.39 (10 Jan 2013)
+
+ 10 Jan 2013; Zac Medico <zmedico@gentoo.org> +portage-2.1.11.39.ebuild:
+ 2.1.11.39 version bump. This fixes bug #243192 (update quickpkg man page), bug
+ #298298 (include packages from nested package sets in emerge --depclean
+ summary), bug #446610 (handle syncfs return value), bug #446662 (add
+ QA_CONFIGURE_OPTIONS), bug #448176 (fix emerge --keep-going to avoid dropping
+ packages), bug #448858 (relocation error triggered by glibc upgrade), bug
+ #449678 (silence repoman warning about usex for EAPI 5), bug #449708 (make
+ use() fatal when called with unknown flags in EAPI 5), bug #450278 (add
+ QA_AM_MAINTAINER_MODE), bug #450960 (mention relavant file names in autounmask
+ messages), and bug #451118 (fix make.conf.5 formatting of compress-index
+ docs). Bug #445274 tracks all bugs fixed since portage-2.1.11.31.
01 Jan 2013; Andreas K. Huettel <dilfridge@gentoo.org> +ChangeLog-2012:
Split ChangeLog.
For previous entries, please see ChangeLog-2012.
-
diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
index 2ebbe0da8513..ed1be5bb963a 100644
--- a/sys-apps/portage/Manifest
+++ b/sys-apps/portage/Manifest
@@ -4,6 +4,7 @@ Hash: SHA256
AUX README.RESCUE 137 SHA256 69bea0c755eab59b6b4d90838b8551744f0b0c8eeac170b1cd13a71ee83f9ac4 SHA512 dba0f0d6d4cd140e636cc70dfb7bdb298e2f2fb040bc07b0874cac994bdbabd26bfd9361d85a0f8b9a92a185281e4901606b9e4f563afdc8867341bbe6af1cb0 WHIRLPOOL 713fcc790442999d56e13efaf536fec9954dadeda680b3642d0358311332096ddedf8b55697bd1ca620d84f0dc7d025ff7931e086c74c1f5032be72dca2ff8f5
DIST portage-2.1.11.31.tar.bz2 848585 SHA256 3013e9ba1fc3f87a5fedff8e5a1d2b36d6a9e06538fdebee6ab7b4cf61d273ce SHA512 12222ecb8e3f3b239c7616568475d87f2ef705b83cb72311c0d70df49c7eef1f1bb4e898afb6f17023b40077a80f9ae26129aef0a52f9f16e22140e5ea8d8522 WHIRLPOOL b3d3b0fc90476c6bd6c41a1dea17999ca21598db547c8e691fdd378e9bbacb991954f03378a033755008d7bc27d15b2505f62e6408ec914e840ead4edc0a5c9a
DIST portage-2.1.11.38.tar.bz2 862196 SHA256 e66839e52b70a69635be2115b448f89bd70f73b872ee269ea07ebf473c9e0c12 SHA512 cc1d1e22c6c5c0ae0ff35f52997b2a830ae6fe722b4fc5782b026a283cc6e5fc0a084433014b8dde47d678a01a86cce9b9fd8e6bd25da20dcaeee22a36546398 WHIRLPOOL 0c2c87371b96f4c19ca2b214e31a6fecda3c068a85a648635abe8439519d8a7c13e2c03853ef8507362e8172a482c9d58a1aea8492446dd49e3b5287e50087c0
+DIST portage-2.1.11.39.tar.bz2 882831 SHA256 cc008b77825088b0dbc3f8cef42926d980253ba4702f1edb5d6558e1dfb8e5aa SHA512 bed862a9534b18e9b3f3275a72edd76513dec8c273d231fdde0145ec815f3eb5eb4b57a702322255edda84f14ac063b7e353976346fd5aa5760f15a530c65ce0 WHIRLPOOL ddad0bf5d883d05ab1ebd5d1fe91178380a652bfe2429729f3ae270f9a95bc75ac13948fad4c96d773f466676da7cf7022f998005416c4a12d178703bdc86e9d
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
@@ -12,17 +13,18 @@ DIST portage-2.2.0_alpha149.patch.bz2 52923 SHA256 ceb46857ba3f8cb50b5ee262377ec
DIST portage-man-pl-2.1.2.tar.bz2 53893 SHA256 960eaa7c6f3a2af44bdc665266a8e884628a562373cc477d301597ecc5ef961f SHA512 5f5c8dd1559048546633b1e7291ff8c0f5d637595f1a4c98405424b08c30c089fc9359e0214f78fbe358754f20d327794f4692b9b67639585c29b755975ee853 WHIRLPOOL 756e267b84077501d976f46fa448cda5368cd52aeca6ec43d109c81fe8e2364e0cd0f35630d68a4186c70e3b440b7c870b86ac7ef83cc0afa43e10f9f8e1f422
EBUILD portage-2.1.11.31.ebuild 9906 SHA256 5d22a8861ce3655199cb139f90910c04363d5d95252f150d5936d566f3f67ef2 SHA512 aa2b8d62b49466bbeddacb92d42f3c8c0b42f1004d49c8b000f528a770398005994359e349df1bd8e2a93e72468151b9be79a7c46f4f9d79d64682c6ee1d4342 WHIRLPOOL b39414b7a7c40a8b151f0a75cfe4502809243e2f3feab8b6f49f915c98e89f07d51e1ede206a285ea3d82692381c6803511cd9dbe0532d78c6cb65e7d9d294b2
EBUILD portage-2.1.11.38.ebuild 9917 SHA256 bde29fa8cebaec447a07430aac9dc038b78a4ffd9b7dd8925ddd76cc12f6651d SHA512 caba01d13444d031ec48eddf21e3a762b565a2c8538db67bcf19de537ccd9825796968efe44102a014a3e54e00fe316d2e11b8b6e1df1f88a7cff0f02ef656a8 WHIRLPOOL b48f05584f8eb174be3eca9c40a78527cedee775a60612c3a6bca49cd20fc48ae7b12378c1ba66de941b3ee782f27c764bd5412f08b2514cefd506dfd436c933
+EBUILD portage-2.1.11.39.ebuild 9917 SHA256 d5daaf8ff13f5cd8ed024c016a618b26e4ee8c2d6d5a1d2d09ad7306bf7e866a SHA512 dc0e47e97bcc19e3edffe320a2c22b10ba8814505d73e4127855af5092e1c205a0c60d14e568b96c41392fd1db2e50332c37c34ddcccd951fd2d2e736d29496b WHIRLPOOL 6be10446358f57d25f31286dfbb4ef702dcc0901fd138c979a9ca4c6c33c37c07260951a504a5d714f6b2507bc1674e2d1938e28d4e8d3ac05571e9cf30096da
EBUILD portage-2.1.6.7_p1.ebuild 8391 SHA256 aa62c9abf35aa31026863d881fcc47eab499992fa290a4aeda39435289358c94 SHA512 f5c66cf066f6096c930a25825314837b214d9c23386f62af8ee4f50b92c8878765ce81274a5335b5f45c8707849ecd3ca5dedb466af7dbbd2744cd356ab7bcbc WHIRLPOOL 6eca21d68dc0ad96d0ab6c9bb84b14dd21100cd48a7531305fa63a1276a1d90ddda33724c32d695632215da338aa91fba412b2f398d2d1ee91fd730d4678484d
EBUILD portage-2.2.0_alpha142.ebuild 12019 SHA256 114f3a0ea3f7da57c0a92f07ffdb0aa67b70cc01dcc1094b0ad687ccd0375a06 SHA512 5706f1230b4c4826a828995304c0715cb2f73c8f5abc4087ec403fa878d98b800998e788f10664c3bc6365ce71082d3d3413365a9a799af39b82f6b24c2b9273 WHIRLPOOL db34366a873b409605196b7903203cd7df11ab6c50f5c0b6447440e91e0e7edbad65c593cd64d406b1023351f3e926e8ea23be07845231521bb5bd040bd9c6a0
EBUILD portage-2.2.0_alpha149.ebuild 12019 SHA256 ca291c4c85651aa92959808e7abb81bf45b3c141e8d51d095fddc53f7c147642 SHA512 569e7d8cec6a57cf08e57c8fa500c8abfbffa127d31373c74d5660634ca6e3b156bc0b1055976e860539c665bc279244d318ab20af913f7596de6d8c521bb5d2 WHIRLPOOL 9a11ffd17a349f418ab099d126c9abf7fc833511ecc9ec7852170946a2efd92c88be111918c13eaa561313ac94b2262739244a4d91ec1cf4c9ad9aeee1bc3f2e
EBUILD portage-9999.ebuild 11269 SHA256 4ec7fcd57652887541b2df50e42fb9324b6bf9dd4b208b1381fef73dc7802e51 SHA512 cdf53f8bc7754f7242adb8e8bb66c2b4ea5e887f9628529a7e778ec8ab0f9de6f670b745e28794ee8686e7ebeee5718dbd95cc988f40fdd94e38337919dec778 WHIRLPOOL 9cd62336147f009d56c594b28949134bf5926a4455060413483d94acbe174b3fe8d00f590fa38ff1122290c792dc9271f27d64f4af346e6705ba47ed4eb8a2a9
-MISC ChangeLog 357 SHA256 ef9c694b9beaa6a9ec537290ac4e7c0e0c09e23426415dfbefc106db9be72add SHA512 df2a937988098d197ec41feaec2e11a8f0394d9530d79b1c16b1717f28596a867cdc64aee21ff834c2fedd7fd16f5d1e6b3a75b92be0fdbabbd27adab309437b WHIRLPOOL 49132f53200169ca800f296e2c6fe56be48fb260b9534f070eea72497f32912ccf89d1aab333f96b7d111b32c0991ac810647f388d0a80a0b926ce7da51c786d
+MISC ChangeLog 1220 SHA256 ba8a307b139fcf27be39f0137cec9af3cd4f965b8c11d7854f11f5840be80192 SHA512 65f4f7b320dd551137e73c52033d9d7da63e5443e9ddf784994e10d66f660fb347265d6b2f62e1925839b9e07952bdc31930f5225e0bb56405325570f28e7e2e WHIRLPOOL 65d474699fa63555aa2ec58523de82a6b06b59cfac0a79bd50afeab3e093a0e53d357c3cb3cea4f7cc2320c510db53bcc1241f10c94ba90adc2502dddcac06f6
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)
-iEYEAREIAAYFAlDnf8sACgkQ/ejvha5XGaOAPQCfd/tKP/wMreBkRJJOsoezCbAU
-GzgAoLZjpbGN2cQWCarmPU5zof6E+Ja6
-=nAv9
+iEYEAREIAAYFAlDu3RcACgkQ/ejvha5XGaNhfACg5OXSR7VLkuOkAOvlnp38nVFi
+y4gAn16SgIBpUe/MnbBxyZNGRcjY5ZVv
+=LVSJ
-----END PGP SIGNATURE-----
diff --git a/sys-apps/portage/portage-2.1.11.39.ebuild b/sys-apps/portage/portage-2.1.11.39.ebuild
new file mode 100644
index 000000000000..e705098a21ab
--- /dev/null
+++ b/sys-apps/portage/portage-2.1.11.39.ebuild
@@ -0,0 +1,287 @@
+# 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.39.ebuild,v 1.1 2013/01/10 15:24:06 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
+
+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 pypy2_0 python2 python3 selinux xattr"
+
+# 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,}"
+
+# The pysqlite blocker is for bug #282760.
+DEPEND="${python_dep}
+ >=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() {
+ [[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
+ /usr/bin/python -c 'import xattr' 2>/dev/null
+}
+
+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
+
+ if use python3; then
+ python_set_active_version 3
+ elif use python2; then
+ python_set_active_version 2
+ elif use pypy2_0; then
+ python_set_active_version 2.7-pypy-2.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 man/* || \
+ 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
+
+ if use python3; then
+ einfo "Converting shebangs for python3..."
+ python_convert_shebangs -r 3 .
+ elif use python2; then
+ einfo "Converting shebangs for python2..."
+ python_convert_shebangs -r 2 .
+ elif use pypy2_0; then
+ einfo "Converting shebangs for pypy-c2.0..."
+ python_convert_shebangs -r 2.7-pypy-2.0 .
+ 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
+ emake docbook || die
+ fi
+
+ if use epydoc; then
+ einfo "Generating api docs"
+ emake epydoc || die
+ fi
+}
+
+src_test() {
+ emake test || die
+}
+
+src_install() {
+ 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
+
+ # Set PYTHONPATH for portage API consumers. This way we don't have
+ # to rely on patched python having the correct path, since it has
+ # been known to incorrectly add /usr/libx32/portage/pym to sys.path.
+ echo "PYTHONPATH=\"/usr/lib/portage/pym\"" > \
+ "${T}/05portage" || die
+ doenvd "${T}/05portage" || die
+}
+
+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
+
+ if ! use build && ! has_version dev-python/pycrypto && \
+ ! has_version '>=dev-lang/python-2.6[ssl]' ; then
+ ewarn "If you are an ebuild developer and you plan to commit ebuilds"
+ ewarn "with this system then please install dev-python/pycrypto or"
+ ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order"
+ ewarn "to enable RMD160 hash support."
+ ewarn "See bug #198398 for more information."
+ 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
+}
+
+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
+}