From b609df311125b171adb0112052fb1ebce591c3ae Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Thu, 20 Aug 2020 17:35:30 +0200 Subject: [PATCH] Pin pip version to install in tinyipa images Since pip needs to be the same during the entire process, let's pin a version that is supposed to work and use it on both build and finalise scripts. Change-Id: I0bbac68bb6e970c2e540d0a03133c3cc828ac44a --- tinyipa/build-tinyipa.sh | 4 ++-- tinyipa/common.sh | 2 ++ tinyipa/finalise-tinyipa.sh | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tinyipa/build-tinyipa.sh b/tinyipa/build-tinyipa.sh index 6fc1454..962cbb3 100755 --- a/tinyipa/build-tinyipa.sh +++ b/tinyipa/build-tinyipa.sh @@ -2,7 +2,7 @@ set -ex WORKDIR=$(readlink -f $0 | xargs dirname) -source ${WORKDIR}/tc-mirror.sh +source ${WORKDIR}/common.sh BUILDDIR="$WORKDIR/tinyipabuild" TINYCORE_MIRROR_URL=${TINYCORE_MIRROR_URL:-} TINYIPA_REQUIRE_BIOSDEVNAME=${TINYIPA_REQUIRE_BIOSDEVNAME:-false} @@ -187,7 +187,7 @@ fi # Build python wheels $CHROOT_CMD ${TINYIPA_PYTHON_EXE} -m ensurepip -$CHROOT_CMD ${PIP_COMMAND} install --upgrade pip wheel +$CHROOT_CMD ${PIP_COMMAND} install --upgrade pip==${PIP_VERSION} wheel $CHROOT_CMD ${PIP_COMMAND} install pbr $CHROOT_CMD ${PIP_COMMAND} wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels -r /tmp/ipa-requirements.txt if [ -n "$IRONIC_LIB_SOURCE" ]; then diff --git a/tinyipa/common.sh b/tinyipa/common.sh index 44d9d08..ddcf0c8 100755 --- a/tinyipa/common.sh +++ b/tinyipa/common.sh @@ -3,6 +3,8 @@ WORKDIR=$(readlink -f $0 | xargs dirname) source ${WORKDIR}/tc-mirror.sh +PIP_VERSION="20.2.2" + # Allow an extension to be added to the generated files by specifying # $BRANCH_PATH e.g. export BRANCH_PATH=master results in tinyipa-master.gz etc BRANCH_EXT='' diff --git a/tinyipa/finalise-tinyipa.sh b/tinyipa/finalise-tinyipa.sh index 4894d84..38617c7 100755 --- a/tinyipa/finalise-tinyipa.sh +++ b/tinyipa/finalise-tinyipa.sh @@ -160,7 +160,7 @@ fi # NOTE(rpittau): pip MUST be the same version used in the build script or # dragons will appear and put everything on fire $CHROOT_CMD ${TINYIPA_PYTHON_EXE} -m ensurepip -$CHROOT_CMD ${PIP_COMMAND} install --upgrade pip wheel +$CHROOT_CMD ${PIP_COMMAND} install --upgrade pip==${PIP_VERSION} wheel # If flag is set install python now if $BUILD_AND_INSTALL_TINYIPA ; then