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
This commit is contained in:
Ian Wienand 2020-12-14 14:53:59 +11:00
parent dbb17e95ef
commit 39c49b3133

View File

@ -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