diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-08-14 21:22:47 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-08-14 21:22:47 +0000 |
commit | 4d726d57fbdd198fb33bf59f79aad5de3dbf872f (patch) | |
tree | 619825c50736d88b48e086afb67bad5f78cf6a38 /eclass | |
parent | Mark selinux policy 20080525 stable, clear old ebuilds. (diff) | |
download | gentoo-2-4d726d57fbdd198fb33bf59f79aad5de3dbf872f.tar.gz gentoo-2-4d726d57fbdd198fb33bf59f79aad5de3dbf872f.tar.bz2 gentoo-2-4d726d57fbdd198fb33bf59f79aad5de3dbf872f.zip |
Small updates.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/python.eclass | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/eclass/python.eclass b/eclass/python.eclass index 5bec3102df5b..31e9b0dcd31a 100644 --- a/eclass/python.eclass +++ b/eclass/python.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.62 2009/08/13 16:57:01 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.63 2009/08/14 21:22:47 arfrever Exp $ # @ECLASS: python.eclass # @MAINTAINER: @@ -113,8 +113,8 @@ PYTHON() { # Make sure PYTHON_ABIS variable has valid value. validate_PYTHON_ABIS() { # Ensure that /usr/bin/python and /usr/bin/python-config are valid. - if [[ "$(</usr/bin/python)" != *"Gentoo Python wrapper program"* ]]; then - die "/usr/bin/python isn't valid program" + if [[ "$(readlink /usr/bin/python)" != "python-wrapper" ]]; then + die "/usr/bin/python isn't valid symlink" fi if [[ "$(</usr/bin/python-config)" != *"Gentoo python-config wrapper script"* ]]; then die "/usr/bin/python-config isn't valid script" @@ -558,7 +558,7 @@ python_mod_compile() { if ((${#myfiles[@]})); then python${PYVER} ${myroot}/usr/$(get_libdir)/python${PYVER}/py_compile.py "${myfiles[@]}" - python${PYVER} -O ${myroot}/usr/$(get_libdir)/python${PYVER}/py_compile.py "${myfiles[@]}" 2> /dev/null + python${PYVER} -O ${myroot}/usr/$(get_libdir)/python${PYVER}/py_compile.py "${myfiles[@]}" &> /dev/null else ewarn "No files to compile!" fi @@ -646,14 +646,14 @@ python_mod_optimize() { site_packages_absolute_dirs+=("${root}$(python_get_sitedir)/${dir}") done "$(PYTHON)" "${root}$(python_get_libdir)/compileall.py" "${options[@]}" "${site_packages_absolute_dirs[@]}" || return_code="1" - "$(PYTHON)" -O "${root}$(python_get_libdir)/compileall.py" "${options[@]}" "${site_packages_absolute_dirs[@]}" 2> /dev/null || return_code="1" + "$(PYTHON)" -O "${root}$(python_get_libdir)/compileall.py" "${options[@]}" "${site_packages_absolute_dirs[@]}" &> /dev/null || return_code="1" fi if ((${#site_packages_files[@]})); then for file in "${site_packages_files[@]}"; do site_packages_absolute_files+=("${root}$(python_get_sitedir)/${file}") done "$(PYTHON)" "${root}$(python_get_libdir)/py_compile.py" "${site_packages_absolute_files[@]}" || return_code="1" - "$(PYTHON)" -O "${root}$(python_get_libdir)/py_compile.py" "${site_packages_absolute_files[@]}" 2> /dev/null || return_code="1" + "$(PYTHON)" -O "${root}$(python_get_libdir)/py_compile.py" "${site_packages_absolute_files[@]}" &> /dev/null || return_code="1" fi eend "${return_code}" fi @@ -668,16 +668,16 @@ python_mod_optimize() { ebegin "Compilation and optimization of Python modules placed outside of site-packages directories for Python ${PYVER}..." if ((${#other_dirs[@]})); then python${PYVER} "${root}$(python_get_libdir)/compileall.py" "${options[@]}" "${other_dirs[@]}" || return_code="1" - python${PYVER} -O "${root}$(python_get_libdir)/compileall.py" "${options[@]}" "${other_dirs[@]}" 2> /dev/null || return_code="1" + python${PYVER} -O "${root}$(python_get_libdir)/compileall.py" "${options[@]}" "${other_dirs[@]}" &> /dev/null || return_code="1" fi if ((${#other_files[@]})); then python${PYVER} "${root}$(python_get_libdir)/py_compile.py" "${other_files[@]}" || return_code="1" - python${PYVER} -O "${root}$(python_get_libdir)/py_compile.py" "${other_files[@]}" 2> /dev/null || return_code="1" + python${PYVER} -O "${root}$(python_get_libdir)/py_compile.py" "${other_files[@]}" &> /dev/null || return_code="1" fi eend "${return_code}" fi else - local myroot mydirs=() myfiles=() myopts=() + local myroot mydirs=() myfiles=() myopts=() return_code="0" # strip trailing slash myroot="${ROOT%/}" @@ -725,17 +725,17 @@ python_mod_optimize() { if ((${#mydirs[@]})); then python${PYVER} \ "${myroot}"/usr/$(get_libdir)/python${PYVER}/compileall.py \ - "${myopts[@]}" "${mydirs[@]}" + "${myopts[@]}" "${mydirs[@]}" || return_code="1" python${PYVER} -O \ "${myroot}"/usr/$(get_libdir)/python${PYVER}/compileall.py \ - "${myopts[@]}" "${mydirs[@]}" 2> /dev/null + "${myopts[@]}" "${mydirs[@]}" &> /dev/null || return_code="1" fi if ((${#myfiles[@]})); then python_mod_compile "${myfiles[@]}" fi - eend $? + eend "${return_code}" fi } |