Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 580366

Summary: app-eselect/eselect-python-20160222 does not respect ROOT
Product: Gentoo Linux Reporter: A. Wilcox (awilfox) <awilfox.gentoo>
Component: [OLD] DevelopmentAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Terminal output from building python:3.4

Description A. Wilcox (awilfox) 2016-04-17 19:36:54 UTC
Installing a Python interpreter using emerge --root succeeds, but during installation, I receive a message such as:

  Switching to python3.5
  Couldn't find a man page for python3.5; skipping.

This is because I have python3.5 installed on the host (in /), but not in the merge root (ROOT=/usr/x86_64-pc-linux-musl in this case).

The get_installed_pythons function of python.eselect should probably be using INTERPRETER_DIR in its type calls.
Comment 1 A. Wilcox (awilfox) 2016-04-17 19:41:38 UTC
Created attachment 431014 [details]
Terminal output from building python:3.4
Comment 2 Mike Gilbert gentoo-dev 2016-04-17 19:45:29 UTC
The eselect python ebuild does this in pkg_postinst:

eselect python update --if-unset

get_installed_pythons() has this:

# filter to installed only
if type -P "${i}" &>/dev/null; then
	echo "${i}"
fi

This is going to give bad results if we are trying to update the selected python with ROOT != /.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-05-16 16:50:26 UTC
Fixed in git now.
Comment 4 Mike Gilbert gentoo-dev 2017-01-29 22:34:34 UTC
Fixed in 20160516.