diff options
author | 2012-09-03 00:02:20 +0000 | |
---|---|---|
committer | 2012-09-03 00:02:20 +0000 | |
commit | 027e23e2d94094283689bf25b7be77df1634cd02 (patch) | |
tree | 1e2d2cbe4612bc09dc67f3026b94518ca3adaf48 /sys-apps | |
parent | 2.1.11.13 version bump. This fixes bug #433694 (emaint cleanconfmem is too (diff) | |
download | historical-027e23e2d94094283689bf25b7be77df1634cd02.tar.gz historical-027e23e2d94094283689bf25b7be77df1634cd02.tar.bz2 historical-027e23e2d94094283689bf25b7be77df1634cd02.zip |
2.2.0_alpha124 version bump. This includes all of the fixes in 2.1.11.13
(including support for EAPI 5_pre1), and also fixes bug #433704 (add
DateSet package set class). Bug #210077 tracks all bugs fixed since
portage-2.1.x.
Package-Manager: portage-2.2.0_alpha124/cvs/Linux i686
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/portage/ChangeLog | 9 | ||||
-rw-r--r-- | sys-apps/portage/Manifest | 10 | ||||
-rw-r--r-- | sys-apps/portage/portage-2.2.0_alpha124.ebuild | 337 |
3 files changed, 351 insertions, 5 deletions
diff --git a/sys-apps/portage/ChangeLog b/sys-apps/portage/ChangeLog index 124718532565..20c6d2f79dc6 100644 --- a/sys-apps/portage/ChangeLog +++ b/sys-apps/portage/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/portage # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1085 2012/09/02 23:59:51 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1086 2012/09/03 00:02:20 zmedico Exp $ + +*portage-2.2.0_alpha124 (03 Sep 2012) + + 03 Sep 2012; Zac Medico <zmedico@gentoo.org> +portage-2.2.0_alpha124.ebuild: + 2.2.0_alpha124 version bump. This includes all of the fixes in 2.1.11.13 + (including support for EAPI 5_pre1), and also fixes bug #433704 (add DateSet + package set class). Bug #210077 tracks all bugs fixed since portage-2.1.x. *portage-2.1.11.13 (02 Sep 2012) diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest index aeca40d55cda..d0457463bd6e 100644 --- a/sys-apps/portage/Manifest +++ b/sys-apps/portage/Manifest @@ -11,6 +11,7 @@ DIST portage-2.1.6.tar.bz2 518771 SHA256 b1c507445b3858449c861568f477e1cfab8b232 DIST portage-2.2.0_alpha111.tar.bz2 836193 SHA256 3187c6915aaab681e444eca0cbe050f8e68f714176b3f7c0cbec0e7e23d5c5df SHA512 b1dfee2c1869cf30ac50c5ecaa603571bd7c71879d5e9fae80b89602b5d7e3016636703ffc7aec384e7d93356c93415200609dcd2f0f9f74a56ca0364144c120 WHIRLPOOL e7a5cea176b66f632388920bf8e1635b2ec8b7ce70f9aedea2289cdc6a7d560e6b0e6f3a7f3636217539d4883857aa84bb85e3b146e749600d57435f613b60a8 DIST portage-2.2.0_alpha120.patch.bz2 33973 SHA256 24a5447e9af37013e30c3372e3eef799e1de17884f6328f08396e8f50c9527d1 SHA512 397114af03680734ba95de42087ead7b8cb122c4952407fb0b0c86c510c65be487d0578a3e5052f8c03c0ed9487b6f8138a4d6fb54b9025c16bd393800b67b59 WHIRLPOOL 440e5796f53be19b4a3af8dacfba576b8bd3cf7fa01bfe1b5d0f1af8fb15fb9daa8efe5d9d909d37712c7a381c3811a8dc213106f19cb87fad3faec75c4c8e9d DIST portage-2.2.0_alpha123.tar.bz2 807753 SHA256 d9818aaba4fb48111adcc54b6034091cd01fb879287be07a83a0c433852ab1a9 SHA512 e1a2df85f7f0dcdd70657ab9a183d975f9eb0455695af505aace87bb8a2e258d31986f1691b99a7d52248093886326c640e32a52ef04c1cee3f3906cd68c0591 WHIRLPOOL aac57874a4fc63faae3d543b39fd7f1ef149bf8c3091b71c925bf651fde7d4d80f97f1d38b301fc5585d510bb734e26a3d99f40a0885d20b805d49d73cf390d2 +DIST portage-2.2.0_alpha124.tar.bz2 814900 SHA256 1734aa790f341eb6a5854caaa7625e3a313715695ff9086dbe258c11b4a2cd59 SHA512 f37d94464232c871e89038a5a4effdf4cc07f48766ccf5f14ee9b7be211e80ed9164819ff8c82d55012a27a28d39f397966845abcdbc898c95f46e0ce8520b86 WHIRLPOOL 4bed04745a6d6489cdb6c7747cbdee63af408069c407e973a9aca6e0af6c81738cd01b2e7b8097e4824aac9afeaa48233c71f3cea1246fccae3d0b90709166d6 DIST portage-man-pl-2.1.2.tar.bz2 53893 SHA256 960eaa7c6f3a2af44bdc665266a8e884628a562373cc477d301597ecc5ef961f SHA512 5f5c8dd1559048546633b1e7291ff8c0f5d637595f1a4c98405424b08c30c089fc9359e0214f78fbe358754f20d327794f4692b9b67639585c29b755975ee853 WHIRLPOOL 756e267b84077501d976f46fa448cda5368cd52aeca6ec43d109c81fe8e2364e0cd0f35630d68a4186c70e3b440b7c870b86ac7ef83cc0afa43e10f9f8e1f422 EBUILD portage-2.1.11.12-r2.ebuild 9856 SHA256 95eaca7b8947a0ade61943f1948e2a661584bd077f13a532ae1e8ff66618f2c8 SHA512 8cdfda7cf57a2b87161dfdd9a8eaa804e3ea69685d4cbb20dae29b6d6e3b514bc1a44169fc6c8a68abbede504285b1a7cc796011ad757716773c82c6bfab5acf WHIRLPOOL 51266671b308f3d6385b54f02a0d7d974dc75ebbcb7d68eefae5da6a2e5bcae1096f9cc25248c9c508bee58c6ce869abf00d6432797a4b09adfbd9d831d8d826 EBUILD portage-2.1.11.13.ebuild 9673 SHA256 06ebc321f275230d9b7cdc7ec4818a24c80260a85b09088eb58199f612fefaf2 SHA512 ccf3d0b7f65538fe486c25278253a903078e5606165647ca44bc6dc91a4af02159b85c5ef783273608e137cac873b38c7062155b0fcfa25a7d16b4df9145dc91 WHIRLPOOL 8d93b5997bdf3bf9a5a1051cfdb1df51f4c5eca9fe9667082dae71a468ba53113ca102ff883838da042577b53581c693d63d966cd98836527b9dddcab9d15b60 @@ -18,13 +19,14 @@ EBUILD portage-2.1.11.9.ebuild 9833 SHA256 4b4e3df3e35a4cfba3fd3134d1dc16514e382 EBUILD portage-2.1.6.7_p1.ebuild 8392 SHA256 75dfa3bdb1100ca28ba46eb83e34ffc196cb3e57204e7b4f451cfb19a1644e62 SHA512 ac70b4ba9d658c4d79953088b2fdaeed8d0e31986ff7c649272c39a743ddfdf112e44d3f0f8078941c47a06b373002cfcd454100585d5bbaa807a2079b19eb8c WHIRLPOOL 57c26b40de86f3d6969fe66d5b1fd6df55f5478e03c855813ff83b1e485f99d1b34cbf30422b5b60986263cae4d4ee066daaa01c0166a04f53c7bb829fd214e1 EBUILD portage-2.2.0_alpha120.ebuild 11951 SHA256 9530b793174de796ecf951a2808cb163005b605630b0455c57194e97f2a36dd2 SHA512 f6af265d8d9b1cbf884787105abb32335727c179d904fbdecba598878083f7384088a5db063aee4282afd4daa4d20f02466911d6c5625bf538c7cdb437026866 WHIRLPOOL 93daa1caa5b31023b1fbb11e8baabf1abced715c879acdc1bb578f75dc58d3737e23bba2c9fa3bd69702810640e47a1debbf3464d16db7a6f68a3d37799b3b76 EBUILD portage-2.2.0_alpha123-r2.ebuild 11957 SHA256 a7707d7bd66d75dcd4bc647bf264d403af46c6e48b589ec943f10da292625a69 SHA512 3bd3a472dfed69de05bc5c41f9520b7e5366e884d51c900ab656b02459b78943a46a55bb8dbda22f4e584f6b6e8bbbf27d8548b3736b768254d7addbad26a956 WHIRLPOOL 7d8ff307c63387bc886ed57f64fb92960776333400a6088bb7666a645090f62a6dc44f6de0607a916d934a7d12c9e9a6d5bbd9c4698c03c6ae2de27c719ad7be +EBUILD portage-2.2.0_alpha124.ebuild 11774 SHA256 49f5aa234fe436575aec2e077e7da04aa9e9eef80df2ab19d0cbb1d23d25281a SHA512 1851aeec9dbc4eb00cdb849396c8dd6b6dc6ac2485fbd7edcdedd09b39ac4af5fef2a981178b9dbb8ff2c37a25e36f403a31e040788a8106dfc08b36d01d5e33 WHIRLPOOL bb0c6af9b622d064981eaf7e59bba5379210bdfbaf2e28c35b13124ffbaf93308f5445e4b96cd0600a96b1a7d53dd7d7bd62ef7f45e2f5783f95189600fb1b77 EBUILD portage-9999.ebuild 11024 SHA256 08e1c594ca54d46a18b231a46416425186a5f21d2bbbd2edac55d775818ea8b2 SHA512 ddc74357dfd1d6fc9f48259e10bcf97dea69cc475404071b91da269798d474bd930d71f793145ea263ea6e0c2369a94f857f6b3976a41f70e17934440f3920af WHIRLPOOL a63765e46e7b530448c20dec5cb9e4029b34b5f7667accf8bbdef2ae0a783db7adf85ba31048e66fc8f14515168b2b51f77a8cbaa84a5f50bab6a0e991f6403c -MISC ChangeLog 112826 SHA256 fd3c101fb29111104785dad31c4a7371a820ee2e7a4f7eb954734d68c4d20e0b SHA512 158a46ed6f5150654f18273ca63edf34ef77ac482300a5a158ed30e1dd025de989b16530fd5b8d46870bc319f35cc3ccdab6d7d0eb6a7966d9d99ccfc192c2a8 WHIRLPOOL 0cda24b6120d3727f800b6415d0edee5be0390efe42da2dc33153e9658d9b88d40792437fef28e7a00466384ead13c15ba66dc4cdb9d924578c16a1cecd48a9f +MISC ChangeLog 113176 SHA256 9acff6aa8e49e90258ec31cead1822f1643663fba073dce7e6734693c7e7fece SHA512 e079c3e3da97fbfd0347c280a7d34f6e958578ed809cb7b1f84d4ab98c2e1357e98d5720d18d1dfdac210c9840b60bfd4a0ba31daeb1fed298cae3b69b1f3c4a WHIRLPOOL 17036e9e1dfa3d470c2dfad119f2c3095670f71d17c291c1b5a5c1260e3d8ffb3d32e30199275b083fa31ecbe925187bd018df322e9a0396f7a2e0e7ec649e30 MISC metadata.xml 926 SHA256 23463fa1d9a37979e2dffb502fffdd4dcd5dc932f4b5b3053999609012e4fc65 SHA512 41478467f90c58d8044471ed85ad6365e976b8cdb43556f024345861d08f1e9ae2f2fc728d114521adece630793248f2598fa330233eb98ae7b42950cf056d08 WHIRLPOOL 1aff07692c1fbca18cd3498f1cac2e64749b784a3135d881fc4cb95040bdfb93af079df1e053a547cfe08ea4384268e36ec98fc25160ad94e6ef65c6d04e5452 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iEYEAREIAAYFAlBD8v0ACgkQ/ejvha5XGaOURACg8+fPqMxjKmoTNawrRDUpgRNq -ycAAn0zNN38YL60p7CzVldBBYEsRcJjK -=qdy1 +iEYEAREIAAYFAlBD85IACgkQ/ejvha5XGaPMAwCZAQiCBFGA2Qwutl3tSui7TuB5 +OekAoOT3LwLJvAaIBa8Hbgz+C2AJXBa+ +=T7rg -----END PGP SIGNATURE----- diff --git a/sys-apps/portage/portage-2.2.0_alpha124.ebuild b/sys-apps/portage/portage-2.2.0_alpha124.ebuild new file mode 100644 index 000000000000..6828a9ca363e --- /dev/null +++ b/sys-apps/portage/portage-2.2.0_alpha124.ebuild @@ -0,0 +1,337 @@ +# 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.2.0_alpha124.ebuild,v 1.1 2012/09/03 00:02: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=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 pypy1_9 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] ) + !pypy1_9? ( !python2? ( !python3? ( + || ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] ) + ) ) ) + pypy1_9? ( !python2? ( !python3? ( dev-python/pypy:1.9[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). +RDEPEND="${python_dep} + !build? ( >=sys-apps/sed-4.0.5 + >=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=install-sources requires debugedit and rsync + +SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives" + +prefix_src_archives() { + local x y + for x in ${@}; do + for y in ${SRC_ARCHIVES}; do + echo ${y}/${x} + done + done +} + +PV_PL="2.1.2" +PATCHVER_PL="" +TARBALL_PV=2.2.0_alpha124 +SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 + $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2) + linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2 + $(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )" + +PATCHVER= +[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV +if [ -n "${PATCHVER}" ]; then + SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2 + $(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)" +fi + +S="${WORKDIR}"/${PN}-${TARBALL_PV} +S_PL="${WORKDIR}"/${PN}-${PV_PL} + +compatible_python_is_selected() { + [[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]] +} + +current_python_has_xattr() { + [[ $("${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 pypy1_9 && use python3 ; then + ewarn "Both pypy1_9 and python3 USE flags are enabled, but only one" + ewarn "can be in the shebangs. Using python3." + fi + if use pypy1_9 && use python2 ; then + ewarn "Both pypy1_9 and python2 USE flags are enabled, but only one" + ewarn "can be in the shebangs. Using python2" + fi + if ! use pypy1_9 && ! 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 pypy1_9; then + python_set_active_version 2.7-pypy-1.9 + 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 pypy1_9; then + einfo "Converting shebangs for pypy-c1.9..." + python_convert_shebangs -r 2.7-pypy-1.9 . + 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 + + 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 + + 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 + + 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 +} |