From 39c49b3133f1fb0e3e0d70888bd7fa451de25f06 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Mon, 14 Dec 2020 14:53:59 +1100 Subject: [PATCH] build-wheel-cache: Ignore missing .whl when removing Per the issue linked inline, the new pip resolver downloads (and reports) wheels that it ultimately seems to discard itself. As of this writing, it's unclear exactly what is going on. We can simply ignore missing files here with -f to safely work around this. Change-Id: I30700e0a0a242f9d7d2563c989a1d25eb6acd6e4 --- roles/build-wheel-cache/files/wheel-build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/build-wheel-cache/files/wheel-build.sh b/roles/build-wheel-cache/files/wheel-build.sh index d8608bdc..0c4457a7 100755 --- a/roles/build-wheel-cache/files/wheel-build.sh +++ b/roles/build-wheel-cache/files/wheel-build.sh @@ -86,7 +86,10 @@ find ${LOGS}/build/ -name stdout -exec grep 'Downloading' {} \; \ | sed -n 's,.*Downloading.*[ /]\([^ /]*\.whl\)\([ #].*\|$\),\1,p' \ | sort -u > ${LOGS}/remove-wheels.txt pushd ${WHEELHOUSE_DIR} -cat ${LOGS}/remove-wheels.txt | xargs rm +# NOTE(ianw) -f to ignore missing because the new pip resolver says it +# downloaded some things that it has ulitmately cleaned up itself; see +# https://github.com/pypa/pip/issues/9271 +cat ${LOGS}/remove-wheels.txt | xargs rm -f popd if [ -f ${FAIL_LOG} ]; then