diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/Manifest b/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/Manifest index b69434e4e7..c858cde41c 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/Manifest @@ -1,14 +1 @@ -DIST python-exec-2.0.1.tar.bz2 80965 SHA256 3eddcb0d6c682a5c182c62578bb8d6ce1140a009873747e9ba1bf9de72ed7efd SHA512 0396e2617c759a66b16e57b0ca60b57e03f3c8096ae4a7f2e402eafcbee4ffd839bf0c6e4d259c6ba90940f9ba7e3f191125e395080cce3ef82e5f52053d0462 WHIRLPOOL 50c0cac1c7e2b5d2a21125647874c83caeabee293b87ef01926474d492b79b7837754c2d26173282977e9d00024559bb070f8d76bb5227df1776e937cd280c32 -DIST python-exec-2.0.2.tar.bz2 82217 SHA256 c411638fe94953c1e8ff57e7b66f601a817633fbc9cb7d410982778042051bb0 SHA512 96198dda88a73b902d617a32f10ddf2ac981b1871fb5eaf5003d77453df8a0aacf299c39c6e49ebaa620994a30e57ee7a1128fb4ba41aa4f503031fa2addef7f WHIRLPOOL 603b494c7b87f0f3f0cfba35378e1a2e231879a01b730657e09ecf798957fa4dfd54a6d852074c2aa9ae3c15e5d1d3203584b8a120e5dd0dee2117319706a5ce -DIST python-exec-2.1.tar.bz2 82167 SHA256 adac4e9ae677ca0fbb9efc55573ecbb0e8361ed7a60a5241e7abc1056fba06ad SHA512 cadfb7723aa412caec4a449909769b14a800c19650c64768b0ffb30b2c0645e70c9a039f960f3263c6c18490bb73c0129b83a72c7407f558bcaf3652cc4c8bcf WHIRLPOOL 72b73b216faf7caa8afbc3ce316771bd832e468cf84835267dc3833d5c52fce24578e09f2d3aa8a322f324426eda5e53bd9611711ea976679574b2be764c2525 -DIST python-exec-2.4.3.tar.bz2 86815 SHA256 581aa0c033632269d553754440d4017c21afc1c1500fd8951de093bc715c63fb SHA512 37fb7f915a2848699e9fca4e09d167b6d6aa192e3c374d7f01aec09529b5f1346ce2c45139f4e8f68b53e3f197b4d77b7f58519b012c117dd5ec8535a43fbe34 WHIRLPOOL 117564deb6f35387757ebbbff96d0325d5979d2933bbfca184cde0170cdd923bf9fa71ba76f234b098df12f006b6f8b5ba388416692ceff56ec7c16173777ab6 -DIST python-exec-2.4.4.tar.bz2 86945 SHA256 cdc780764bce79047ab047160156c5dc3bf5728d9c59cf1ed904fdf12638d60b SHA512 26b76960430dc3b2b79aab5e8a72498144d4e78bed5291fe9361afe081f0e8d70049a74ec29384cb0fc199f76c23499324d2eddcaea521ef33d88e61b1b674f9 WHIRLPOOL 791fd9732179d17bf5cd981956759e7c25e1e1dcbaf6fdfb05cf4fed8d4f44490740aaa5b4d38335a72128f8fdea0f6ab2e34c331a2b7f6b0897aa7eaa1f0c48 -EBUILD python-exec-2.0.1-r1.ebuild 1040 SHA256 677933eddddd9fa749a0cb9120b899b3344ebb8245ae9d92e02dc4fe9afd4911 SHA512 d48b579d23ea8419a2f187d00d10db17e9b7eeb419de3647ef189431616bd88c99818ecfc266a0c5a05681ccb5fd981682a6b0513e74e8caa0ac85728772a93b WHIRLPOOL 94a7c4bee0442beadcf0823312669405353d765cf8e689126c11c8148e04288ae506d062bda34e55f8ba9b552cfeb1d107e1b13b2d800fb1b08b400c0849dbf0 -EBUILD python-exec-2.0.2.ebuild 1040 SHA256 5674a796355dd3dd40dbdfaac309677506efd999a8ec37e0e2c0a3a12d1b79c2 SHA512 b1868daf3e24badb91c9c24acd631cc72dd81acb20f4418f1e7a944d71757b9e0af4f84e2fcc87d85144125ad89582f4345c538837d7674504269f769b1993b6 WHIRLPOOL ea0591aee261b6a9947dfe2f4ced24aac01dfddbfc66e1b1f56859795ca029099a77cd09bbe07137e092a35fdee30807bebfa6675eff2e064363a22175eb023a -EBUILD python-exec-2.1.ebuild 1188 SHA256 2238c0ccaa921db68601172fa9110a3601522100e7ad715532bb3663efa8ba0c SHA512 d65782c09fdbb43b8458c96dfecdf165cb54b1605d9d3397a6da3d3dab29ce23f36bd181bc5616511af103fe25a840ad36cad83fad71f3b3d6064670c75ed50d WHIRLPOOL 5c36fc3ca5ffa425b7e733e9c144d6ab01fd42f5832dff2414c215d92cf4e6df14b7636cc7840bd43662b20292d56d57082b5620780706587e9687ee1f158955 -EBUILD python-exec-2.4.3.ebuild 4330 SHA256 3f0fd729473db2db53fde07ec8dda59fccda3635bae557f294b74efacbece973 SHA512 5047ce61d689905edd334e5ff1f46d3b586ab820e1c093fbfe2b73a905cf83054362a767596de4cf8483f12b9ef51bdffd2db4c24badeb104d689fdf598ff411 WHIRLPOOL e613cfe112099a5ef28670e56408eedfb42df6ead62d0956839e2bccace5ed5b8cd70784b0b4d9bd37368f48b3795590815cf3fbcb813c9fae32255a1f6c826a -EBUILD python-exec-2.4.4.ebuild 4321 SHA256 ba0e1cb801749b124147fd1cfff59b1228e5ccd44cc4440811e8a995822f18ac SHA512 82afcaa43b6b5813a94e6f578563bdbe3fed543b8b1908fcd5d506b061b7e597ee95ef0d9bba204b77e32382d0a4e32fd676ed2762866a152fdeacf1cd75af14 WHIRLPOOL b15ca49be61f58c44a0afad4dc9986262abedd25741090a2a84a7da45b85b9bb8725d60d130afbdaf83b452c9fd7a263098fbe4e1475ebf762fc213391a8f6be -EBUILD python-exec-9999.ebuild 4493 SHA256 137eed25e6b43dead89c1c4cb24466e62d724ee55855d4c91efc8c647a7919cd SHA512 ec41744160a7917ffc086ced6592eb919302b5cfe2fbf04a108817d3e55a9dad51dcce583d683383ad28a6f8e3602fcb4554f6cd6f70148096da87a67b48f9d9 WHIRLPOOL e49a9eca5f9ad0358d2b0d525c057a23d7e10212509493751bfc60a2a455ef18e5318adfb5995a489b5bdf57a89315fd6d4d544fe670bb6e92955d1c5ad0ad9b -MISC ChangeLog 10720 SHA256 3d82f9b81fc855db286b1fc912731759c811815c348046491edef317e22d29e4 SHA512 6eed75de98c71ac6e81eae8607405efb133472936ec613a2ba70ead54eda3839a8b4b50dbca78325cfa9d0c2fe4b5a0de791dd19d1ac0349787b0865f6cd0715 WHIRLPOOL 636aab31ec2d766cb177b25734dd245e30262870e1837ea8eabcb71dfb02e6a89a3bc54ed03e6a3b6cc83df8ae9ec8721a266f9945cfdc227ee36e3a1811e422 -MISC ChangeLog-2015 3848 SHA256 5f99d4b5e2ae61ae1330ac7a10f56d3fae902ef2a2a52de9b07383197c57e71f SHA512 e516a7461f0d8008c7554858bb9d490db05768d90c5f237a6ca9e8c4a0902bc9205f389c7dab410ed0a48689dd774012487340954eb9c19873fa0b2608d871e2 WHIRLPOOL c6551fd2ced06008adf39300cf22953fd13129cd4291b3f9c49d12bda3bc809daf010997de7b7a643fadfeafe7324e869975a1a42aa7c6450465377ab1117fb3 -MISC metadata.xml 529 SHA256 3b9edc78a1d04691c7dcbc9a848d150c58be99ab3a884ac5bf74266401278522 SHA512 3483112d6662461c2800bbd5722ef47f13477c2ca4d744e84d6cf54a3eb9e244271678989ac827bbd5f6f59f7fd3e467ef8bc05fba770b56057016d70a09e398 WHIRLPOOL e60263b0c27cc02a01d448503962e889fb35e2408cfd12d0b6faca5a2a572a7ca32d354f59b532d705c1ff1f655ff075c822f3f2fd74aed23459ac6b0fd3964e +DIST python-exec-2.4.8.tar.bz2 82671 BLAKE2B ac85f3dd6da3d1c535ad56a25edbbcb1d0e75b91e3567b80f27fd01d32a199a713909a8552dffaacbe96c43bca491f31c3f0c7f1a618fb9144814365686715cf SHA512 d6dabab217dc2f1817e2f4d159102a9467f51b26b91f4ae7fb7e4930d30334f74bd8a5f37cc60d58c6e1e61e89a3b4d2e1bd17413493ba86f38fa71250cf5ac1 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/metadata.xml index edb96f5bbb..95267dce89 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/metadata.xml @@ -1,5 +1,5 @@ - + python@gentoo.org @@ -11,6 +11,13 @@ Michał Górny https://github.com/mgorny/python-exec/issues/ - mgorny/python-exec + mgorny/python-exec + + + Install generic symlinks like python and python3. If this flag + is disabled, only versioned python3.X executables will + be available to end users and ebuilds not using python eclasses. + + diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/python-exec-2.0.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/python-exec-2.0.1-r1.ebuild deleted file mode 100644 index 9f61668c91..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/python-exec-2.0.1-r1.ebuild +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -# Kids, don't do this at home! -inherit python-utils-r1 -PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" ) - -inherit autotools-utils python-r1 - -DESCRIPTION="Python script wrapper" -HOMEPAGE="https://github.com/mgorny/python-exec/" -SRC_URI="https://github.com/mgorny/${PN}/releases/download/${P}/${P}.tar.bz2" - -LICENSE="BSD-2" -SLOT="2" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="" - -RDEPEND="! "${T}"/python-exec.conf || die - insinto /etc/python-exec - doins "${T}"/python-exec.conf - - local f - for f in python{,2,3}; do - # symlink the C wrapper for python to avoid shebang recursion - # bug #568974 - dosym python-exec2c /usr/bin/"${f}" - done - for f in python{,2,3}-config 2to3 idle pydoc pyvenv; do - # those are python scripts (except for new python-configs) - # so symlink them via the python wrapper - dosym ../lib/python-exec/python-exec2 /usr/bin/"${f}" - done -} - -pkg_preinst() { - if [[ -e ${EROOT}etc/python-exec/python-exec.conf ]]; then - # preserve current configuration - cp "${EROOT}"etc/python-exec/python-exec.conf \ - "${ED}"etc/python-exec/python-exec.conf || die - else - # preserve previous Python version preference - local py old_pythons=() - local config_base=${EROOT}etc/env.d/python - - # start with the 'global' preference (2 vs 3) - if [[ -f ${config_base}/config ]]; then - old_pythons+=( "$(<${config_base}/config)" ) - fi - - # then try specific py3 selection - for py in 3; do - local target= - - if [[ -f ${config_base}/python${py} ]]; then - # try the newer config files - target=$(<${config_base}/python${py}) - elif [[ -L ${EROOT}/usr/bin/python${py} ]]; then - # check the older symlink format - target=$(readlink "${EROOT}/usr/bin/python${py}") - - # check if it's actually old eselect symlink - [[ ${target} == python?.? ]] || target= - fi - - # add the extra target if found and != global - if [[ ${target} && ${old_pythons[0]} != ${target} ]]; then - old_pythons+=( "${target}" ) - fi - done - - if [[ ${old_pythons[@]} ]]; then - elog "You seem to have just upgraded into the new version of python-exec" - elog "that uses python-exec.conf for configuration. The ebuild has attempted" - elog "to convert your previous configuration to the new format, resulting" - elog "in the following preferences (most preferred version first):" - elog - for py in "${old_pythons[@]}"; do - elog " ${py}" - done - elog - elog "Those interpreters will be preferred when running Python scripts or" - elog "calling wrapped Python executables (python, python2, pydoc...)." - elog "If none of the preferred interpreters are supported, python-exec will" - elog "fall back to the newest supported Python version." - elog - elog "Please note that due to the ambiguous character of the old settings," - elog "you may want to modify the preference list yourself. In order to do so," - elog "open the following file in your favorite editor:" - elog - elog " ${EROOT}etc/python-exec/python-exec.conf" - elog - elog "For more information on the new configuration format, please read" - elog "the comment on top of the installed configuration file." - - local IFS=$'\n' - echo "${old_pythons[*]}" \ - >> "${ED}"etc/python-exec/python-exec.conf || die - fi - fi -} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/python-exec-2.4.4.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/python-exec-2.4.4.ebuild deleted file mode 100644 index 5e183a1e5b..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/python-exec-2.4.4.ebuild +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -# Kids, don't do this at home! -inherit python-utils-r1 -PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" ) - -# Inherited purely to have PYTHON_TARGET flags which will satisfy USE -# dependencies and trigger necessary rebuilds. -inherit python-r1 - -DESCRIPTION="Python script wrapper" -HOMEPAGE="https://github.com/mgorny/python-exec/" -SRC_URI="https://github.com/mgorny/${PN}/releases/download/${P}/${P}.tar.bz2" - -LICENSE="BSD-2" -SLOT="2" -KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ia64 m68k ~mips ppc ~ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="" - -# eselect-python because of /usr/bin/python* collisions and new config -# python versions because of missing $scriptdir/python* symlinks -RDEPEND=" - ! "${T}"/python-exec.conf || die - insinto /etc/python-exec - doins "${T}"/python-exec.conf - - local f - for f in python{,2,3}; do - # symlink the C wrapper for python to avoid shebang recursion - # bug #568974 - dosym python-exec2c /usr/bin/"${f}" - done - for f in python{,2,3}-config 2to3 idle pydoc pyvenv; do - # those are python scripts (except for new python-configs) - # so symlink them via the python wrapper - dosym ../lib/python-exec/python-exec2 /usr/bin/"${f}" - done -} - -pkg_preinst() { - if [[ -e ${EROOT}etc/python-exec/python-exec.conf ]]; then - # preserve current configuration - cp "${EROOT}"etc/python-exec/python-exec.conf \ - "${ED}"etc/python-exec/python-exec.conf || die - else - # preserve previous Python version preference - local py old_pythons=() - local config_base=${EROOT}etc/env.d/python - - # start with the 'global' preference (2 vs 3) - if [[ -f ${config_base}/config ]]; then - old_pythons+=( "$(<${config_base}/config)" ) - fi - - # then try specific py3 selection - for py in 3; do - local target= - - if [[ -f ${config_base}/python${py} ]]; then - # try the newer config files - target=$(<${config_base}/python${py}) - elif [[ -L ${EROOT}/usr/bin/python${py} ]]; then - # check the older symlink format - target=$(readlink "${EROOT}/usr/bin/python${py}") - - # check if it's actually old eselect symlink - [[ ${target} == python?.? ]] || target= - fi - - # add the extra target if found and != global - if [[ ${target} && ${old_pythons[0]} != ${target} ]]; then - old_pythons+=( "${target}" ) - fi - done - - if [[ ${old_pythons[@]} ]]; then - elog "You seem to have just upgraded into the new version of python-exec" - elog "that uses python-exec.conf for configuration. The ebuild has attempted" - elog "to convert your previous configuration to the new format, resulting" - elog "in the following preferences (most preferred version first):" - elog - for py in "${old_pythons[@]}"; do - elog " ${py}" - done - elog - elog "Those interpreters will be preferred when running Python scripts or" - elog "calling wrapped Python executables (python, python2, pydoc...)." - elog "If none of the preferred interpreters are supported, python-exec will" - elog "fall back to the newest supported Python version." - elog - elog "Please note that due to the ambiguous character of the old settings," - elog "you may want to modify the preference list yourself. In order to do so," - elog "open the following file in your favorite editor:" - elog - elog " ${EROOT}etc/python-exec/python-exec.conf" - elog - elog "For more information on the new configuration format, please read" - elog "the comment on top of the installed configuration file." - - local IFS=$'\n' - echo "${old_pythons[*]}" \ - >> "${ED}"etc/python-exec/python-exec.conf || die - fi - fi -} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/python-exec-2.4.8.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/python-exec-2.4.8.ebuild new file mode 100644 index 0000000000..39e408c148 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/python-exec-2.4.8.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} pypy3 ) +inherit python-any-r1 + +DESCRIPTION="Python script wrapper" +HOMEPAGE="https://github.com/mgorny/python-exec/" +SRC_URI="https://github.com/mgorny/python-exec/releases/download/v${PV}/${P}.tar.bz2" + +LICENSE="BSD-2" +SLOT="2" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +# Internal Python project hack. Do not copy it. Ever. +IUSE="${_PYTHON_ALL_IMPLS[@]/#/python_targets_} +native-symlinks test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-lang/python-exec-conf + !<=dev-lang/python-2.7.18-r3:2.7" +BDEPEND=" + test? ( + $(python_gen_any_dep 'dev-python/pytest[${PYTHON_USEDEP}]') + )" + +python_check_deps() { + has_version -b "dev-python/pytest[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_configure() { + local pyimpls=() i EPYTHON + for i in "${_PYTHON_ALL_IMPLS[@]}"; do + if use "python_targets_${i}"; then + _python_export "${i}" EPYTHON + pyimpls+=( "${EPYTHON}" ) + fi + done + + local myconf=( + --with-fallback-path="${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin" + --with-python-impls="${pyimpls[*]}" + ) + + econf "${myconf[@]}" +} + +src_install() { + default + + if use native-symlinks; then + local programs=( python python3 ) + local scripts=( python-config python3-config 2to3 idle pydoc pyvenv ) + + local f + for f in "${programs[@]}"; do + # symlink the C wrapper for python to avoid shebang recursion + # bug #568974 + dosym python-exec2c /usr/bin/"${f}" + done + for f in "${scripts[@]}"; do + # those are python scripts (except for new python-configs) + # so symlink them via the python wrapper + dosym ../lib/python-exec/python-exec2 /usr/bin/"${f}" + done + fi +} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/python-exec-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/python-exec-9999.ebuild deleted file mode 100644 index c130a90f54..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-lang/python-exec/python-exec-9999.ebuild +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -#if LIVE -EGIT_REPO_URI="https://github.com/mgorny/${PN}.git" - -inherit autotools git-r3 -#endif - -# Kids, don't do this at home! -inherit python-utils-r1 -PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" ) - -# Inherited purely to have PYTHON_TARGET flags which will satisfy USE -# dependencies and trigger necessary rebuilds. -inherit python-r1 - -DESCRIPTION="Python script wrapper" -HOMEPAGE="https://github.com/mgorny/python-exec/" -SRC_URI="https://github.com/mgorny/${PN}/releases/download/${P}/${P}.tar.bz2" - -LICENSE="BSD-2" -SLOT="2" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="" - -# eselect-python because of /usr/bin/python* collisions and new config -# python versions because of missing $scriptdir/python* symlinks -RDEPEND=" - ! "${T}"/python-exec.conf || die - insinto /etc/python-exec - doins "${T}"/python-exec.conf - - local f - for f in python{,2,3}; do - # symlink the C wrapper for python to avoid shebang recursion - # bug #568974 - dosym python-exec2c /usr/bin/"${f}" - done - for f in python{,2,3}-config 2to3 idle pydoc pyvenv; do - # those are python scripts (except for new python-configs) - # so symlink them via the python wrapper - dosym ../lib/python-exec/python-exec2 /usr/bin/"${f}" - done -} - -pkg_preinst() { - if [[ -e ${EROOT}etc/python-exec/python-exec.conf ]]; then - # preserve current configuration - cp "${EROOT}"etc/python-exec/python-exec.conf \ - "${ED}"etc/python-exec/python-exec.conf || die - else - # preserve previous Python version preference - local py old_pythons=() - local config_base=${EROOT}etc/env.d/python - - # start with the 'global' preference (2 vs 3) - if [[ -f ${config_base}/config ]]; then - old_pythons+=( "$(<${config_base}/config)" ) - fi - - # then try specific py3 selection - for py in 3; do - local target= - - if [[ -f ${config_base}/python${py} ]]; then - # try the newer config files - target=$(<${config_base}/python${py}) - elif [[ -L ${EROOT}/usr/bin/python${py} ]]; then - # check the older symlink format - target=$(readlink "${EROOT}/usr/bin/python${py}") - - # check if it's actually old eselect symlink - [[ ${target} == python?.? ]] || target= - fi - - # add the extra target if found and != global - if [[ ${target} && ${old_pythons[0]} != ${target} ]]; then - old_pythons+=( "${target}" ) - fi - done - - if [[ ${old_pythons[@]} ]]; then - elog "You seem to have just upgraded into the new version of python-exec" - elog "that uses python-exec.conf for configuration. The ebuild has attempted" - elog "to convert your previous configuration to the new format, resulting" - elog "in the following preferences (most preferred version first):" - elog - for py in "${old_pythons[@]}"; do - elog " ${py}" - done - elog - elog "Those interpreters will be preferred when running Python scripts or" - elog "calling wrapped Python executables (python, python2, pydoc...)." - elog "If none of the preferred interpreters are supported, python-exec will" - elog "fall back to the newest supported Python version." - elog - elog "Please note that due to the ambiguous character of the old settings," - elog "you may want to modify the preference list yourself. In order to do so," - elog "open the following file in your favorite editor:" - elog - elog " ${EROOT}etc/python-exec/python-exec.conf" - elog - elog "For more information on the new configuration format, please read" - elog "the comment on top of the installed configuration file." - - local IFS=$'\n' - echo "${old_pythons[*]}" \ - >> "${ED}"etc/python-exec/python-exec.conf || die - fi - fi -}