From 3b66beeee0a189ec720d5dd7b301d49020007de3 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Fri, 22 Mar 2013 14:34:01 -0700 Subject: [PATCH] fix(sys-apps/portage): bump to the 2.1.11.58 the coreos patch is upstream in 2.1.11.58, use it: bugs.gentoo.org/show_bug.cgi?id=462528 --- .../coreos-overlay/sys-apps/portage/Manifest | 29 -- ...olver-output-check-for-None-mainRepo.patch | 36 -- .../sys-apps/portage/metadata.xml | 18 - .../portage/portage-2.1.10.11-r9.ebuild | 331 ----------------- .../sys-apps/portage/portage-2.1.11.31.ebuild | 279 --------------- ....11.50.ebuild => portage-2.1.11.58.ebuild} | 81 ++++- .../portage/portage-2.1.6.7_p1.ebuild | 263 -------------- .../portage/portage-2.2.0_alpha142.ebuild | 332 ------------------ .../portage/portage-2.2.0_alpha161.ebuild | 332 ------------------ 9 files changed, 67 insertions(+), 1634 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/portage/Manifest delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/resolver-output-check-for-None-mainRepo.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/portage/metadata.xml delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.1.10.11-r9.ebuild delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.1.11.31.ebuild rename sdk_container/src/third_party/coreos-overlay/sys-apps/portage/{portage-2.1.11.50.ebuild => portage-2.1.11.58.ebuild} (78%) delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.1.6.7_p1.ebuild delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.2.0_alpha142.ebuild delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.2.0_alpha161.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/Manifest b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/Manifest deleted file mode 100644 index 0ee962c154..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/Manifest +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN PGP SIGNED MESSAGE----- -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.50.tar.bz2 895469 SHA256 39f61e4f2256cbc9f7b6e5da9d6eeb43ff16fd674d7304a7b280ff84d8835110 SHA512 4d313e62ee250b852950ebfd2bb8edf465f56d8e6b9f473b0c55b3856755ad4cb6c6875ab067ca2978c4a0cc75ad6583dc14425b5b4fcf096e72797bc5271a8c WHIRLPOOL cf0b2212eda9c78a8e57f37570dc87a0af0f11ea7b9b79938e7ac78b2196283880571e8bd000c35d665e5188500064aa5065dc7b5a2d0de21c9b8e4d54a2bfec -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 -DIST portage-2.2.0_alpha142.tar.bz2 848765 SHA256 c2fb4499fbf747ad11a297f2ab0340f6af7958868cc72530627dd46596e88ff5 SHA512 f0fb016503d1e7998cc295c07ea83d4210075ea3d8c9421e2e9fe4256dde4138a073c60c6f11dc1dd0b3a362404810dea84ee878eec8a0c74bd43ef8e3741d2c WHIRLPOOL 34f1f5ebd2f18e52b1d441d763fda335cdbcc879aa89e36ca5a8e344567c8ab30d7a88864f97a332ba4b2a9d226eae89a41302e73ebe7eb2d33d2a9a0a3211be -DIST portage-2.2.0_alpha160.tar.bz2 895123 SHA256 25741e1a0cb2169008a20a3eda99666223694f1a046b3ed26ef43246f77acc84 SHA512 bfaf840c56d088a57211fcb6a7e78279f9980078dc0d199828a6cd663fe3801b76a0375ba4cfe00c4455fe822a40d104b3424608751d85f577824cdc03605b35 WHIRLPOOL e3c4a8f9a484e42c30319fe842807557e2953c4bf6c8849a639b6b908044f84f7283f18dd260cd3d8ce5c8ef1f037fa51b67d08c062b76f8267d76ab83f2f6d0 -DIST portage-2.2.0_alpha161.patch.bz2 2850 SHA256 77e949bb0b3c6ef10839ec9ae5f29477e88211a35964b75459ec4fa363a1ced5 SHA512 656181fe02cd983e647b4dbe615718e62284cbccf118f98cb7bff02f704d4d3f7fd24d4f161eb1d34ceab3d4e3ac233743a8d1ab33312517de8498c8f3417eb7 WHIRLPOOL 3127c9347a006ac393a2ffd1ebe8c18c3363fec5ca3114a99375c9446daf5737fbdc6d9e813ce95d75851b954c40cf658f0fd81800560cc2b5c2dd6d4c75a969 -DIST portage-man-pl-2.1.2.tar.bz2 53893 SHA256 960eaa7c6f3a2af44bdc665266a8e884628a562373cc477d301597ecc5ef961f SHA512 5f5c8dd1559048546633b1e7291ff8c0f5d637595f1a4c98405424b08c30c089fc9359e0214f78fbe358754f20d327794f4692b9b67639585c29b755975ee853 WHIRLPOOL 756e267b84077501d976f46fa448cda5368cd52aeca6ec43d109c81fe8e2364e0cd0f35630d68a4186c70e3b440b7c870b86ac7ef83cc0afa43e10f9f8e1f422 -EBUILD portage-2.1.11.31.ebuild 9491 SHA256 9863b8e6dde0e56fa233e173681627b0829ad3a435ac1baa9f83009c0674261d SHA512 507850eeca468753feeb90c422d182491246fd6f7aae7ef1a250464d1e0cc03385258e07cbf0d3f142db2d95ea23d373739c30fc640793c10e3e9b472f5e0bb7 WHIRLPOOL aff26d5e9fdd8459ee2a217bab8c8fb2210428ad8ac5418bfcfb2c4420cf8d9a4a65f20972d678ca4986bfe88e290989c3c6477d14f8799573fb8fa7df8a9674 -EBUILD portage-2.1.11.50.ebuild 9527 SHA256 f8970421a7200ee8e9df3c2614cbfd03dd5beabdff7efe9acc5e410a34a07f68 SHA512 d17f855c8fc0942f93d7a39d3e79ab092d56990c69f698337b1ab4ed8d0ea5560dd97c9f08fec2c42862b636ac6f5b5c974dbd640cb2f9ec61f6d38e354c6c0a WHIRLPOOL 6ab24d858c216a893f8ca823210e2cd011d5caa739eb4a31b982679d736d20df3b1ce2aba2264af28bcefac838bc148e61efd678b76d90d5c45265a11f26878e -EBUILD portage-2.1.6.7_p1.ebuild 8391 SHA256 aa62c9abf35aa31026863d881fcc47eab499992fa290a4aeda39435289358c94 SHA512 f5c66cf066f6096c930a25825314837b214d9c23386f62af8ee4f50b92c8878765ce81274a5335b5f45c8707849ecd3ca5dedb466af7dbbd2744cd356ab7bcbc WHIRLPOOL 6eca21d68dc0ad96d0ab6c9bb84b14dd21100cd48a7531305fa63a1276a1d90ddda33724c32d695632215da338aa91fba412b2f398d2d1ee91fd730d4678484d -EBUILD portage-2.2.0_alpha142.ebuild 11604 SHA256 43d5a0819c0c6e1eba6367e9e7dae5d9d2ea2d225b3b4d6ae411e901fd958fb6 SHA512 a6915f0247c7c2569f0375f438653be00ced292c6103c2fdbaa929b2356644d34e470303f3febe1699f5e34f0ad18159b5ac806b8f274936914f24c78f2f60be WHIRLPOOL 9794d6d300605cc03bd685e6e53254980d9213aee9b5b6302d6307652c615cedd84376fe01b06bb7440ffe6d5d72e6271bf3f87b7f0dae44686549cb76b2d77d -EBUILD portage-2.2.0_alpha161.ebuild 11629 SHA256 caa4d9b6b957cfa6a56a9222777b251b26ce5bea9a9d047184c3810ed52c4059 SHA512 55bae972b15f73486c55e05fe5ac7855e59669f8872076a07cf6996965f084e1a46d32ef2516cf83e71775c1dd40cda1a5d5f28f902f20f800a919481606fe61 WHIRLPOOL 395158708748eccaab91a7f79dbb62edf86df1035e243933964a03119790a12fa6de0575ca14455ea65a77d20b99698ced07a40cd00fee09730cc04485459e2b -EBUILD portage-9999.ebuild 10879 SHA256 b96acd02aebee2316dec2b9645ef4daa77ea8c4a494332f3f523c48f026212f1 SHA512 724873dffe51cec7439854159d0a440e1f153dcc08abdd4dec36ac1690b4d7decc7888fc6fcdf20ea0d2a53b06c6a476d69f7ce774316e26a2046d2b1e4b45ac WHIRLPOOL 0443ef6e30f230361ae1bc1ccf37e37547017e0ca764003cce60814acffbaa6c5a018cd2c70575c6f8334416d19fa60127f476749304c5b42a261a9272bf071e -MISC ChangeLog 9278 SHA256 114f5b33895b68e1000c43a2d74cd17da0e2053888ab30be7377c67237ad14f6 SHA512 95009d5680035a088f5f1f20ac6240c1020cb6884374295fe9c4f0de5a1c99fa90d938a3d4a91dd019ea33c3fc1dbac934088ed16f08d0e50aafac9e43b1bb6e WHIRLPOOL 6159c1642cd0529c149e418aff8a24eecfd66606b521a919c723de46c66d0e77d28cfef03c750ab489429ecaad71f164ee1122e12235930b14ce401fc8af3ccc -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) - -iEYEAREIAAYFAlEFpGAACgkQ/ejvha5XGaO9jwCeLeUuxo6dikEYzv1dbXeK7v03 -49MAn1wp8Fi6XMI0oWoJz6t6n7P88ll5 -=g6Ji ------END PGP SIGNATURE----- diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/resolver-output-check-for-None-mainRepo.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/resolver-output-check-for-None-mainRepo.patch deleted file mode 100644 index d3682ca907..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/resolver-output-check-for-None-mainRepo.patch +++ /dev/null @@ -1,36 +0,0 @@ -From c18588ddccaa0a4568764a09c9598e176eadc843 Mon Sep 17 00:00:00 2001 -From: Brandon Philips -Date: Wed, 20 Mar 2013 11:13:53 -0700 -Subject: [PATCH] resolver: output: check for None mainRepo() - -mainRepo() can return none when we are on a machine that is only using -PORTAGE_BINHOST and not a normal PORTAGE. Make sure we don't crash here. ---- - pym/_emerge/resolver/output.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py -index 46a13bf..a14478e 100644 ---- a/pym/_emerge/resolver/output.py -+++ b/pym/_emerge/resolver/output.py -@@ -385,7 +385,7 @@ class Display(object): - if old_pkg.slot != old_pkg.sub_slot or \ - old_pkg.slot == pkg.slot and old_pkg.sub_slot != pkg.sub_slot: - key += "/" + old_pkg.sub_slot -- if not self.quiet_repo_display and (self.verbose_main_repo_display or -+ if not self.quiet_repo_display and self.portdb.repositories.mainRepo() and (self.verbose_main_repo_display or - any(x.repo != self.portdb.repositories.mainRepo().name for x in myoldbest + [pkg])): - key += _repo_separator + old_pkg.repo - versions.append(key) -@@ -419,7 +419,7 @@ class Display(object): - @param pkg_info: dictionary - @rtype string - """ -- if not self.quiet_repo_display and (self.verbose_main_repo_display or -+ if not self.quiet_repo_display and self.portdb.repositories.mainRepo() and (self.verbose_main_repo_display or - any(x.repo != self.portdb.repositories.mainRepo().name for x in pkg_info.oldbest_list + [pkg])): - pkg_str += _repo_separator + pkg.repo - return pkg_str --- -1.8.1.4 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/metadata.xml b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/metadata.xml deleted file mode 100644 index 90e04cd819..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/metadata.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - mailto:dev-portage@gentoo.org - http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=blob_plain;f=RELEASE-NOTES - http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3 - - dev-portage@gentoo.org - - Build html API documentation with epydoc. - Use inter-process communication between portage and running ebuilds. - Pull in sys-apps/less as default pager for etc-update. - Use pypy-c2.0 as Python interpreter. - Use python2 as Python interpreter. - Use python3 as Python interpreter. - - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.1.10.11-r9.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.1.10.11-r9.ebuild deleted file mode 100644 index ef7e0d2230..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.1.10.11-r9.ebuild +++ /dev/null @@ -1,331 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.10.3.ebuild,v 1.1 2011/06/14 00:42:00 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 multilib 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 +less linguas_pl python2 python3 selinux" -PROVIDE="virtual/portage" - -python_dep="python3? ( =dev-lang/python-3* ) - !python2? ( !python3? ( - build? ( || ( dev-lang/python:2.7 dev-lang/python:2.6 ) ) - !build? ( || ( dev-lang/python:2.7 dev-lang/python:2.6 >=dev-lang/python-3 ) ) - ) ) - python2? ( !python3? ( || ( dev-lang/python:2.7 dev-lang/python:2.6 ) ) )" - -# The pysqlite blocker is for bug #282760. -DEPEND="${python_dep} - !build? ( >=sys-apps/sed-4.0.5 ) - doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) - epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )" - -RDEPEND="${python_dep} - !build? ( >=sys-apps/sed-4.0.5 - >=app-shells/bash-3.2_p17 - >=app-admin/eselect-1.2 ) - elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) - elibc_glibc? ( >=sys-apps/sandbox-1.6 ) - elibc_uclibc? ( >=sys-apps/sandbox-1.6 ) - >=app-misc/pax-utils-0.1.17 - selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] = 0x2060000 and "good" or "bad")') = good ]] -} - -pkg_setup() { - # Bug #359731 - Die early if get_libdir fails. - [[ -z $(get_libdir) ]] && \ - die "get_libdir returned an empty string" - - 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 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 - 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 - epatch "${FILESDIR}"/${PVR}.patch - 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 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 . - fi -} - -src_compile() { - if use doc; then - cd "${S}"/doc - touch fragment/date - make xhtml xhtml-nochunks || die "failed to make docs" - fi - - if use epydoc; then - einfo "Generating api docs" - mkdir "${WORKDIR}"/api - local my_modules epydoc_opts="" - my_modules="$(find "${S}/pym" -name "*.py" \ - | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ - -e 's:/:.:g' | sort)" || die "error listing modules" - # workaround for bug 282760 - > "$S/pym/pysqlite2.py" - PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ - epydoc -o "${WORKDIR}"/api \ - -qqqqq --no-frames --show-imports $epydoc_opts \ - --name "${PN}" --url "${HOMEPAGE}" \ - ${my_modules} || die "epydoc failed" - rm "$S/pym/pysqlite2.py" - fi -} - -src_test() { - # make files executable, in case they were created by patch - find bin -type f | xargs chmod +x - PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ - ./pym/portage/tests/runTests || die "test(s) failed" -} - -src_install() { - local libdir=$(get_libdir) - local portage_base="/usr/${libdir}/portage" - local portage_share_config=/usr/share/portage/config - - cd "${S}"/cnf - insinto /etc - doins etc-update.conf dispatch-conf.conf || die - - insinto "$portage_share_config" - doins "$S/cnf/make.globals" || die - if [ -f "make.conf.${ARCH}".diff ]; then - patch make.conf "make.conf.${ARCH}".diff || \ - die "Failed to patch make.conf.example" - newins make.conf make.conf.example || die - 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 "" - newins make.conf make.conf.example || die - fi - - dosym ..${portage_share_config}/make.globals /etc/make.globals - - insinto /etc/logrotate.d - doins "${S}"/cnf/logrotate.d/elog-save-summary || die - - # BSD and OSX need a sed wrapper so that find/xargs work properly - if use userland_GNU; then - rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper" - fi - - local x symlinks files - - cd "$S" || die "cd failed" - for x in $(find bin -type d) ; do - exeinto $portage_base/$x || die "exeinto failed" - cd "$S"/$x || die "cd failed" - files=$(find . -mindepth 1 -maxdepth 1 -type f ! -type l) - if [ -n "$files" ] ; then - doexe $files || die "doexe failed" - fi - symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) - if [ -n "$symlinks" ] ; then - cp -P $symlinks "$D$portage_base/$x" || die "cp failed" - fi - done - - cd "$S" || die "cd failed" - for x in $(find pym/* -type d) ; do - insinto $portage_base/$x || die "insinto failed" - cd "$S"/$x || die "cd failed" - # __pycache__ directories contain no py files - [[ "*.py" != $(echo *.py) ]] || continue - doins *.py || die "doins failed" - symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) - if [ -n "$symlinks" ] ; then - cp -P $symlinks "$D$portage_base/$x" || die "cp failed" - fi - done - - # Symlinks to directories cause up/downgrade issues and the use of these - # modules outside of portage is probably negligible. - for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do - [ ! -L "${x}" ] && continue - die "symlink to directory will cause upgrade/downgrade issues: '${x}'" - done - - exeinto ${portage_base}/pym/portage/tests - doexe "${S}"/pym/portage/tests/runTests - - doman "${S}"/man/*.[0-9] - if use linguas_pl; then - doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] - doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] - fi - - dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} - use doc && dohtml -r "${S}"/doc/* - use epydoc && dohtml -r "${WORKDIR}"/api - - dodir /usr/bin - for x in ebuild egencache emerge portageq quickpkg repoman ; do - dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} - done - - dodir /usr/sbin - local my_syms="archive-conf - dispatch-conf - emaint - emerge-webrsync - env-update - etc-update - fixpackages - regenworld" - local x - for x in ${my_syms}; do - dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} - done - dosym env-update /usr/sbin/update-env - dosym etc-update /usr/sbin/update-etc - - dodir /etc/portage - keepdir /etc/portage -} - -pkg_preinst() { - 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 [ -f "${ROOT}/etc/make.globals" ]; then - rm "${ROOT}/etc/make.globals" - fi - - [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" - REPO_LAYOUT_CONF_WARN=$? -} - -pkg_postinst() { - # Compile all source files recursively. Any orphans - # will be identified and removed in postrm. - python_mod_optimize /usr/$(get_libdir)/portage/pym - - if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then - ewarn - echo "If you want overlay eclasses to override eclasses from" \ - "other repos then see the portage(5) man page" \ - "for information about the new layout.conf and repos.conf" \ - "configuration files." \ - | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done - ewarn - fi - - einfo - einfo "For help with using portage please consult the Gentoo Handbook" - einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3" - einfo -} - -pkg_postrm() { - python_mod_cleanup /usr/$(get_libdir)/portage/pym -} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.1.11.31.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.1.11.31.ebuild deleted file mode 100644 index 7dfa464b0d..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.1.11.31.ebuild +++ /dev/null @@ -1,279 +0,0 @@ -# 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.31.ebuild,v 1.12 2013/01/27 22:04:14 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-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] = 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() { - epatch "${FILESDIR}/resolver-output-check-for-None-mainRepo.patch" - 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 [[ -d ${ROOT}var/log/portage && \ - $(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \ - has_version ' \ - "${T}/05portage" || die - doenvd "${T}/05portage" || 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 files x + for impl in "${PYTHON_COMPAT[@]}" ; do + use "python_targets_${impl}" || continue + while read -r mod_dir ; do + cd "${S}/pym/${mod_dir}" || die + files=$(echo *.py) + if [ -z "${files}" ] || [ "${files}" = "*.py" ]; then + # __pycache__ directories contain no py files + continue + fi + dest_mod_dir=/usr/$(get_libdir)/${impl/_/.}/site-packages/${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 "${S}"/pym || die ; find * -type d ! -path "portage/tests*") + dest_mod_dir=/usr/$(get_libdir)/${impl/_/.}/site-packages + case "${impl}" in + python*) + python=${impl/_/.} + python=/usr/bin/${python} + "${python}" -m compileall -q -f -d "${dest_mod_dir}" "${D}${dest_mod_dir#/}" || die + "${python}" -OO -m compileall -q -f -d "${dest_mod_dir}" "${D}${dest_mod_dir#/}" || die + ;; + pypy*) + python=${impl/_/.} + python=/usr/bin/${python/pypy/pypy-c} + "${python}" -m compileall -q -f -d "${dest_mod_dir}" "${D}${dest_mod_dir#/}" || die + ;; + esac + done } pkg_preinst() { @@ -267,12 +326,6 @@ pkg_preinst() { 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/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.1.6.7_p1.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.1.6.7_p1.ebuild deleted file mode 100644 index 94dc0f1470..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.1.6.7_p1.ebuild +++ /dev/null @@ -1,263 +0,0 @@ -# Copyright 1999-2012 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.5 2013/01/05 01:19:27 zmedico Exp $ - -inherit eutils multilib 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 ~sparc-fbsd x86 ~x86-fbsd" -SLOT="0" -IUSE="build doc epydoc less selinux linguas_pl" - -python_dep=">=dev-lang/python-2.4 =dev-python/epydoc-3_pre0' && \ - epydoc_opts='--exclude-introspect portage\.dbapi' - my_modules="$(find "${S}/pym" -name "*.py" \ - | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ - -e 's:/:.:g' | sort)" || die "error listing modules" - # workaround for bug 282760 - > "$S/pym/pysqlite2.py" - PYTHONPATH="${S}/pym:${PYTHONPATH}" epydoc -o "${WORKDIR}"/api \ - -qqqqq --no-frames --show-imports $epydoc_opts \ - --name "${PN}" --url "${HOMEPAGE}" \ - ${my_modules} || die "epydoc failed" - rm "$S/pym/pysqlite2.py" - fi -} - -src_test() { - ./pym/portage/tests/runTests || \ - die "test(s) failed" -} - -src_install() { - local libdir=$(get_libdir) - local portage_base="/usr/${libdir}/portage" - local portage_share_config=/usr/share/portage/config - - cd "${S}"/cnf - insinto /etc - doins etc-update.conf dispatch-conf.conf - - dodir "${portage_share_config}" - insinto "${portage_share_config}" - doins "${S}/cnf/"make.globals - if [ -f "make.conf.${ARCH}".diff ]; then - patch make.conf "make.conf.${ARCH}".diff || \ - die "Failed to patch make.conf.example" - newins make.conf 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 "" - newins make.conf make.conf.example - fi - - dosym ..${portage_share_config}/make.globals /etc/make.globals - - insinto /etc/logrotate.d - doins "${S}"/cnf/logrotate.d/elog-save-summary - - dodir ${portage_base}/bin - exeinto ${portage_base}/bin - - # BSD and OSX need a sed wrapper so that find/xargs work properly - if use userland_GNU; then - rm "${S}"/bin/sed || die "Failed to remove sed wrapper" - fi - - cd "${S}"/bin - doexe * - dosym newins ${portage_base}/bin/donewins - - local symlinks - for mydir in $(find "${S}"/pym -type d | sed -e "s:^${S}/::") ; do - dodir ${portage_base}/${mydir} - insinto ${portage_base}/${mydir} - cd "${S}"/${mydir} - doins *.py - symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) - [ -n "${symlinks}" ] && cp -P ${symlinks} "${D}${portage_base}/${mydir}" - done - - # Symlinks to directories cause up/downgrade issues and the use of these - # modules outside of portage is probably negligible. - for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do - [ ! -L "${x}" ] && continue - die "symlink to directory will cause upgrade/downgrade issues: '${x}'" - done - - exeinto ${portage_base}/pym/portage/tests - doexe "${S}"/pym/portage/tests/runTests - - doman "${S}"/man/*.[0-9] - if use linguas_pl; then - doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] - doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] - fi - - dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} - use doc && dohtml -r "${S}"/doc/* - use epydoc && dohtml -r "${WORKDIR}"/api - - dodir /usr/bin - for x in ebuild emerge portageq repoman xpak; do - dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} - done - - dodir /usr/sbin - local x - for x in archive-conf dispatch-conf emaint emerge-webrsync env-update \ - etc-update fixpackages quickpkg regenworld ; do - dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} - done - dosym env-update /usr/sbin/update-env - dosym etc-update /usr/sbin/update-etc - - dodir /etc/portage - keepdir /etc/portage -} - -pkg_preinst() { - if [ -f "${ROOT}/etc/make.globals" ]; then - rm "${ROOT}/etc/make.globals" - fi - has_version ">=${CATEGORY}/${PN}-2.2_pre" - DOWNGRADE_FROM_2_2=$? - has_version "<${CATEGORY}/${PN}-2.1.6_pre" - UPGRADE_FROM_2_1=$? -} - -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 - echo "Since you have downgraded from portage-2.2, do not forget to" \ - "use revdep-rebuild when appropriate, since the @preserved-rebuild" \ - "package set is only supported with portage-2.2." | fmt -w 70 | \ - while read ; do ewarn "$REPLY" ; done - warning_shown=1 - fi - if [ $UPGRADE_FROM_2_1 = 0 ] ; then - ewarn - echo "In portage-2.1.6, the default behavior has changed for" \ - "\`emerge world\` and \`emerge system\` commands. These commands" \ - "will reinstall all packages from the given set unless an option" \ - "such as --noreplace, --update, or --newuse is specified." \ - | fmt -w 70 | while read ; do ewarn "$REPLY" ; done - ewarn - echo "File collision protection is now enabled by default via" \ - "make.globals with FEATURES=protect-owned. If you want to" \ - "disable collision protection completely (not recommended), then" \ - "you need to ensure that neither protect-owned nor collision-protect" \ - "are enabled." | fmt -w 70 | while read ; do ewarn "$REPLY" ; done - ewarn - echo "If you have overridden FETCHCOMMAND or RESUMECOMMAND variables," \ - "for compatibility with EAPI 2, you must ensure that these variables" \ - "are written such that the downloaded file will be placed at" \ - "\"\${DISTDIR}/\${FILE}\". Refer to make.conf(5) for" \ - "information about FETCHCOMMAND and RESUMECOMMAND." | \ - fmt -w 70 | while read ; do ewarn "$REPLY" ; done - warning_shown=1 - fi - if [ $warning_shown = 1 ] ; then - ewarn # for symmetry - fi -} - -pkg_postrm() { - python_mod_cleanup /usr/$(get_libdir)/portage/pym -} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.2.0_alpha142.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.2.0_alpha142.ebuild deleted file mode 100644 index ed4ff4788b..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.2.0_alpha142.ebuild +++ /dev/null @@ -1,332 +0,0 @@ -# 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_alpha142.ebuild,v 1.6 2013/01/27 22:04:14 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 -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="~amd64-fbsd ~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-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] = 0x2060000 and "good" or "bad")') = good ]] -} - -current_python_has_xattr() { - [[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \ - "${EPREFIX}/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 - - 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 ..." - find . -type f -print0 | \ - 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 - - 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 - - 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 || \ - 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() { - # make files executable, in case they were created by patch - find bin -type f | xargs chmod +x - emake test || die -} - -src_install() { - 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 - - # 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=\"${EPREFIX}/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 "$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 - - 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() { - # Compile all source files recursively. Any orphans - # will be identified and removed in postrm. - python_mod_optimize /usr/lib/portage/pym - - 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" - 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 - done - fi -} - -pkg_postrm() { - python_mod_cleanup /usr/lib/portage/pym -} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.2.0_alpha161.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.2.0_alpha161.ebuild deleted file mode 100644 index 472198783f..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-2.2.0_alpha161.ebuild +++ /dev/null @@ -1,332 +0,0 @@ -# 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_alpha161.ebuild,v 1.2 2013/01/27 22:04:14 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 -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="~amd64-fbsd ~sparc-fbsd ~x86-fbsd" -SLOT="0" -IUSE="build doc epydoc +ipc linguas_pl linguas_ru 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-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] = 0x2060000 and "good" or "bad")') = good ]] -} - -current_python_has_xattr() { - [[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \ - "${EPREFIX}/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 $(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 - - 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 - - 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 ..." - find . -type f -print0 | \ - 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 - - 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 - - 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 || \ - 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() { - # make files executable, in case they were created by patch - find bin -type f | xargs chmod +x - emake test || die -} - -src_install() { - 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 - - # 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=\"${EPREFIX}/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 "$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 - - 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() { - # Compile all source files recursively. Any orphans - # will be identified and removed in postrm. - python_mod_optimize /usr/lib/portage/pym - - 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" - 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 - done - fi -} - -pkg_postrm() { - python_mod_cleanup /usr/lib/portage/pym -}