Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 524964 | Differences between
and this patch

Collapse All | Expand All

(-)a/bin/ebuild-helpers/portageq (-3 / +17 lines)
Lines 2-10 Link Here
2
# Copyright 2009-2013 Gentoo Foundation
2
# Copyright 2009-2013 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
4
5
scriptpath=${BASH_SOURCE[0]}
6
scriptname=${scriptpath##*/}
7
5
PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}
8
PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}
6
PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
9
PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
7
# Use safe cwd, avoiding unsafe import for bug #469338.
10
# Use safe cwd, avoiding unsafe import for bug #469338.
8
cd "${PORTAGE_PYM_PATH}"
11
cd "${PORTAGE_PYM_PATH}"
9
PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
12
10
	exec "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH/portageq" "$@"
13
IFS=':'
14
15
for path in ${PATH}; do
16
	[[ -x ${path}/${scriptname} ]] || continue
17
	[[ ${path}/${scriptname} -ef ${scriptpath} ]] && continue
18
	PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
19
		exec "${PORTAGE_PYTHON:-/usr/bin/python}" \
20
			"${path}/${scriptname}" "$@"
21
done
22
23
unset IFS
24
echo "${scriptname}: command not found" 1>&2
25
exit 127
11
- 

Return to bug 524964