summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2018-12-20 20:40:39 +0800
committerBenda Xu <heroxbd@gentoo.org>2018-12-23 18:31:12 +0800
commitd9a8a3922164ccd23d037302d7335b955c173927 (patch)
treeee36c8aebb765c68da92a64d6d538ab73ef98b39
parentsys-devel/gcc: sync (diff)
downloadprefix-d9a8a3922164ccd23d037302d7335b955c173927.tar.gz
prefix-d9a8a3922164ccd23d037302d7335b955c173927.tar.bz2
prefix-d9a8a3922164ccd23d037302d7335b955c173927.zip
scripts/bootstrap-prefix.sh: portage library into python search path
Otherwise PYTHONPATH is needed for both portageq and emerge. Signed-off-by: Benda Xu <heroxbd@gentoo.org>
-rwxr-xr-xscripts/bootstrap-prefix.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 74395071ec..c358c0955e 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -669,6 +669,10 @@ bootstrap_portage() {
rm -f "${ROOT}"/tmp/usr/lib/portage/bin/ebuild-helpers/sed
[[ -e "${ROOT}"/tmp/usr/portage ]] || ln -s "${PORTDIR}" "${ROOT}"/tmp/usr/portage
+ for d in "${ROOT}"/tmp/usr/lib/python?.?; do
+ [[ -e ${d}/portage ]] || ln -s "${ROOT}"/tmp/usr/lib/portage/pym/portage ${d}/portage
+ [[ -e ${d}/_emerge ]] || ln -s "${ROOT}"/tmp/usr/lib/portage/pym/_emerge ${d}/_emerge
+ done
if [[ -s ${PORTDIR}/profiles/repo_name ]]; then
# sync portage's repos.conf with the tree being used
@@ -1463,7 +1467,6 @@ do_emerge_pkgs() {
PORTAGE_CONFIGROOT="${EPREFIX}" \
PORTAGE_SYNC_STALE=0 \
FEATURES="-news ${FEATURES}" \
- PYTHONPATH="${ROOT}"/tmp/usr/lib/portage/pym \
USE="${myuse[*]}" \
emerge -v --oneshot --root-deps ${opts} "${pkg}"
)