Merge "squash-package-install to use the correct python"

This commit is contained in:
Jenkins 2017-03-14 01:35:42 +00:00 committed by Gerrit Code Review
commit 756923c85b
2 changed files with 5 additions and 5 deletions

View File

@ -60,6 +60,10 @@ def main():
# pre-seed some paths for the shell script
environ['_LIB'] = diskimage_builder.paths.get_path('lib')
# export the path to the current python
if not os.environ.get('DIB_PYTHON_EXEC'):
os.environ['DIB_PYTHON_EXEC'] = sys.executable
# we have to handle being called as "disk-image-create" or
# "ramdisk-image-create". ramdisk-iamge-create is just a symlink
# to disk-image-create

View File

@ -5,8 +5,4 @@ fi
set -eu
set -o pipefail
# Search for python first in case we are in a venv with python3 which
# should take precedence
python_path=$(command -v python || command -v python2 || command -v python3)
sudo -E $python_path $(dirname $0)/../bin/package-installs-squash --elements="$IMAGE_ELEMENT" --path=$ELEMENTS_PATH $TMP_MOUNT_PATH/tmp/package-installs.json
sudo -E $DIB_PYTHON_EXEC $(dirname $0)/../bin/package-installs-squash --elements="$IMAGE_ELEMENT" --path=$ELEMENTS_PATH $TMP_MOUNT_PATH/tmp/package-installs.json