mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-16 08:01:59 +01:00
Setup python symlinks for python on stateful partition.
Change-Id: Ifbfbd3b55ae97ea94ea5bba40a001c6a1ddbf7a0 BUG=720 TEST=Ran suite_Smoke in a VM and ran python from command line and checked to see if I could import packages from /usr/local/site-packages. Review URL: http://codereview.chromium.org/3972001
This commit is contained in:
parent
d6435d4746
commit
6304adc473
12
build_image
12
build_image
@ -427,6 +427,18 @@ update_dev_packages() {
|
|||||||
${ROOT_FS_DIR}/usr/local/lib/python2.6/site-packages/pygtk.pth"
|
${ROOT_FS_DIR}/usr/local/lib/python2.6/site-packages/pygtk.pth"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If python is installed on stateful-dev, fix python symlinks.
|
||||||
|
local python_path="/usr/local/bin/python2.6"
|
||||||
|
if [ -e "${ROOT_FS_DIR}${python_path}" ]; then
|
||||||
|
info "Fixing python symlinks for developer and test images."
|
||||||
|
local python_paths="/usr/bin/python /usr/local/bin/python \
|
||||||
|
/usr/bin/python2 /usr/local/bin/python2"
|
||||||
|
for path in ${python_paths}; do
|
||||||
|
sudo rm -f "${ROOT_FS_DIR}${path}"
|
||||||
|
sudo ln -s ${python_path} "${ROOT_FS_DIR}${path}"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Check that the image has been correctly created. Only do it if not
|
# Check that the image has been correctly created. Only do it if not
|
||||||
# building a factory install image and not a dev install shim, as the
|
# building a factory install image and not a dev install shim, as the
|
||||||
# INSTALL_MASK for it will make test_image fail.
|
# INSTALL_MASK for it will make test_image fail.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user