summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2012-10-29 09:49:54 +0000
committerMichał Górny <mgorny@gentoo.org>2012-10-29 09:49:54 +0000
commit44480af142180b7d9743f9eb3d362a29ccc7db2f (patch)
tree2291c148d1496ff63c1a6efdf71e238a70c8e89e /eclass/distutils-r1.eclass
parentUse new python-r1 functions. (diff)
downloadgentoo-2-44480af142180b7d9743f9eb3d362a29ccc7db2f.tar.gz
gentoo-2-44480af142180b7d9743f9eb3d362a29ccc7db2f.tar.bz2
gentoo-2-44480af142180b7d9743f9eb3d362a29ccc7db2f.zip
Use find instead of hard-coded executable locations list when linking the wrapper.
Diffstat (limited to 'eclass/distutils-r1.eclass')
-rw-r--r--eclass/distutils-r1.eclass15
1 files changed, 7 insertions, 8 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 7ca7d8729ab5..494b25662ea2 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.9 2012/10/29 09:47:41 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.10 2012/10/29 09:49:54 mgorny Exp $
# @ECLASS: distutils-r1
# @MAINTAINER:
@@ -256,15 +256,14 @@ distutils-r1_python_install_all() {
local EPYTHON
python_export_best EPYTHON
- for f in "${D}"/{bin,sbin,usr/bin,usr/sbin,games/bin}/*-"${EPYTHON}"; do
- if [[ -x ${f} ]]; then
- debug-print "${FUNCNAME}: found executable at ${f#${D}/}"
+ local f
+ while IFS= read -r -d '' f; do
+ debug-print "${FUNCNAME}: found executable at ${f#${D}/}"
- local wrapf=${f%-${EPYTHON}}
+ local wrapf=${f%-${EPYTHON}}
- _python_ln_rel "${ED}"/usr/bin/python-exec "${wrapf}" || die
- fi
- done
+ _python_ln_rel "${ED}"/usr/bin/python-exec "${wrapf}" || die
+ done < <(find "${D}" -type f -executable -name "*-${EPYTHON}" -print0)
}
# @FUNCTION: distutils-r1_run_phase