Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 312553 Details for
Bug 416145
app-eselect/eselect-python: Suggest value for PYTHON_TARGETS when changing default python interpreter
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
python.eselect-python_targets.patch
python.eselect-python_targets.patch (text/plain), 1.59 KB, created by
Krzysztof Pawlik (RETIRED)
on 2012-05-21 17:19:28 UTC
(
hide
)
Description:
python.eselect-python_targets.patch
Filename:
MIME Type:
Creator:
Krzysztof Pawlik (RETIRED)
Created:
2012-05-21 17:19:28 UTC
Size:
1.59 KB
patch
obsolete
>diff -r 60a36b1bd9dc python.eselect >--- a/python.eselect Tue Nov 08 23:19:31 2011 +0000 >+++ b/python.eselect Mon May 21 19:16:01 2012 +0200 >@@ -37,6 +37,8 @@ set_python() { > local symlink="${INTERPRETER_PATH}python" target="${1}" > ln -s python-wrapper "${symlink}" > echo "${target}" > "${ENV_D_PATH}/python/config" >+ >+ check_for_python_targets > } > > set_python_config() { >@@ -52,6 +54,37 @@ EOF > chmod a+rx "${script}" > } > >+generate_python_targets() { >+ local suggested_value="" >+ for executable in /usr/bin/python?.? /usr/bin/jython?.? /usr/bin/pypy-c?.?; do >+ [[ -e "${executable}" ]] || continue >+ suggested_value="${suggested_value} $(basename "${executable}")" >+ done >+ suggested_value="${suggested_value//./_}" >+ echo "${suggested_value}" >+} >+ >+check_for_python_targets() { >+ local current_value= >+ if [[ -e /usr/bin/pinspect ]]; then >+ current_value="$(/usr/bin/pinspect query env_var PYTHON_TARGETS)" >+ elif [[ -e /usr/bin/portageq ]]; then >+ current_value="$(/usr/bin/portageq envvar PYTHON_TARGETS)" >+ else >+ die "Could not find current value of PYTHON_TARGETS" >+ fi >+ local missing= >+ for py_interpreter in $(generate_python_targets); do >+ has ${py_interpreter} ${current_value} || \ >+ missing="${missing} ${py_interpreter}" >+ done >+ if [[ -n "${missing}" ]]; then >+ write_warning_msg "Your current PYTHON_TARGETS is missing one or more available interpeter:" >+ write_warning_msg "Current: ${current_value}" >+ write_warning_msg "Suggested: ${current_value}${missing}" >+ fi >+} >+ > # Try to remove python and python.1 symlinks > remove_symlinks() { > local symlink symlink_target symlink_target_found
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 416145
:
312553
|
313235