diff options
author | 2012-06-25 21:57:39 +0800 | |
---|---|---|
committer | 2012-06-25 21:57:39 +0800 | |
commit | 4f69310d6adec303a2bd8528df705a8d00d3e6ba (patch) | |
tree | d3d8d28c267f6a79002189ad7c651a1168a409fb | |
parent | [dev-python/pyudev] 0.15 added with working test phase (diff) | |
download | improvise-4f69310d6adec303a2bd8528df705a8d00d3e6ba.tar.gz improvise-4f69310d6adec303a2bd8528df705a8d00d3e6ba.tar.bz2 improvise-4f69310d6adec303a2bd8528df705a8d00d3e6ba.zip |
[app-admin/eselect-python] fix to patch, commented [dev-python/pyudev/files/pyudev_wrapped_test.patch]
(Portage version: 2.1.10.65/git/Linux x86_64, unsigned Manifest commit)
-rw-r--r-- | app-admin/eselect-python/files/python-eselect.patch | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/app-admin/eselect-python/files/python-eselect.patch b/app-admin/eselect-python/files/python-eselect.patch index 58e72d8..9cceab7 100644 --- a/app-admin/eselect-python/files/python-eselect.patch +++ b/app-admin/eselect-python/files/python-eselect.patch @@ -1,6 +1,6 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/python.eselect --- python.eselect 2011-11-09 07:15:22.000000000 +0800 -+++ python.eselect 2012-06-06 16:42:14.825413552 +0800 ++++ python.eselect 2012-06-25 21:48:00.142723058 +0800 @@ -1,4 +1,4 @@ -# Copyright 1999-2010 Gentoo Foundation +7# Copyright 1999-2010 Gentoo Foundation @@ -44,7 +44,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt #!/usr/bin/env bash # Gentoo python-config wrapper script -@@ -49,18 +52,29 @@ +@@ -49,18 +52,31 @@ python_config="\${EPYTHON/python/python-config-}" "\${0%/*}/\${python_config:-${target}}" "\$@" EOF @@ -61,6 +61,8 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt +EOF + chmod a+rx "${pyscript}" + fi ++ # We always need a "${script}" ++ ln -s "${pyscript}" "${script}" } # Try to remove python and python.1 symlinks @@ -77,7 +79,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt [[ ! -L "${symlink}" ]] && continue symlink_target_found=0 for symlink_target in "${symlink}".?; do -@@ -75,7 +89,7 @@ +@@ -75,7 +91,7 @@ rm -f "${INTERPRETER_PATH%/bin/}/lib/Python.framework}"/{Headers,Python,Resources} } @@ -86,7 +88,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt set_man_symlink() { local target="${1}" x extension -@@ -86,13 +100,15 @@ +@@ -86,13 +102,15 @@ fi done @@ -104,7 +106,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt popd 1> /dev/null } -@@ -175,17 +191,22 @@ +@@ -175,17 +193,22 @@ describe_show_options() { echo "--ABI : Show Python ABI in format of PYTHON_ABI variable" @@ -128,7 +130,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt --python2) python2="1" ;; -@@ -201,9 +222,15 @@ +@@ -201,9 +224,15 @@ if [[ "${python2}" == "1" && "${python3}" == "1" ]]; then die -q "'--python2' and '--python3' options cannot be specified simultaneously" @@ -145,7 +147,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt interpreter="$(readlink "${INTERPRETER_PATH}python2")" elif [[ "${python3}" == "1" ]]; then interpreter="$(readlink "${INTERPRETER_PATH}python3")" -@@ -211,8 +238,10 @@ +@@ -211,8 +240,10 @@ interpreter="$(<"${ENV_D_PATH}/python/config")" fi @@ -153,11 +155,11 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt + if [[ "${ABI}" == "1" && "${interpreter:0:6}" == "python" ]]; then echo -n "${interpreter#python}" + elif [[ "${ABI}" == "1" && "${interpreter:0:6}" == "pypy-c" ]]; then -+ echo -n "${interpreter#pypy-c}" ++ echo -n 2.7-"${interpreter/c/}" else echo -n "${interpreter}" fi -@@ -229,14 +258,23 @@ +@@ -229,14 +260,23 @@ } describe_list_options() { @@ -182,7 +184,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt --python2) python2="1" python_descriptive_name="Python 2" -@@ -258,19 +296,66 @@ +@@ -258,19 +298,69 @@ if [[ "${python2}" == "1" && "${python3}" == "1" ]]; then die -q "'--python2' and '--python3' options cannot be specified simultaneously" @@ -245,9 +247,12 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt + write_numbered_list -m "(none found)" "${targets[@]}" + + else -+ targets=($(find_targets)) -+ active="$(do_show ${python_version_option})" ++ targets=($(find_targets)) active=($(find_targets)) ++ + write_list_start "Available ${python_descriptive_name} interpreters:" ++ ++ active="$(do_show ${python_version_option})" ++ + for ((i = 0; i < ${#targets[@]}; i++)); do + if [[ ${targets[${i}]} == ${active} ]]; then + targets[${i}]="$(highlight_marker "${targets[${i}]}")" @@ -258,7 +263,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt } ### set action ### -@@ -280,6 +365,7 @@ +@@ -280,6 +370,7 @@ } describe_set_options() { @@ -266,7 +271,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt echo "--python2 : Set active Python 2 interpreter without setting of main active Python interpreter if it is not set to Python 2" echo "--python3 : Set active Python 3 interpreter without setting of main active Python interpreter if it is not set to Python 3" } -@@ -289,10 +375,14 @@ +@@ -289,10 +380,14 @@ } do_set() { @@ -282,7 +287,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt --python2) python2="1" PYTHON_INTERPRETERS_GROUP="2" -@@ -310,6 +400,10 @@ +@@ -310,6 +405,10 @@ if [[ "${python2}" == "1" && "${python3}" == "1" ]]; then die -q "'--python2' and '--python3' options cannot be specified simultaneously" @@ -293,7 +298,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt fi if [[ $# -lt 1 ]]; then -@@ -319,9 +413,11 @@ +@@ -319,9 +418,11 @@ else main_active_python_interpreter="$(do_show)" if [[ "${python2}" == "1" && "${main_active_python_interpreter}" != "python2."* ]]; then @@ -308,7 +313,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt fi if ! set_scripts_and_symlinks "${1}"; then -@@ -343,12 +439,14 @@ +@@ -343,12 +444,14 @@ describe_update_options() { echo "--if-unset : Do not override existing implementation" echo "--ignore SLOT : Ignore SLOT when setting symlinks" @@ -324,7 +329,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt while [[ $# > 0 ]]; do case "$1" in --if-unset) -@@ -357,6 +455,10 @@ +@@ -357,6 +460,10 @@ --ignore) ignored_slots+=("${2}") shift;; @@ -335,7 +340,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt --python2) python2="1" python_version_option="--python2" -@@ -374,19 +476,28 @@ +@@ -374,19 +481,28 @@ if [[ "${python2}" == "1" && "${python3}" == "1" ]]; then die -q "'--python2' and '--python3' options cannot be specified simultaneously" |