The find command here aims to delete unwanted files:
|
&& find /usr/local -depth \ |
|
\( \ |
|
\( -type d -a -name test -o -name tests \) \ |
|
-o \ |
|
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ |
|
\) -exec rm -rf '{}' + \ |
However the inner conditionals used are of form:
-type d -a -name test -o -name tests
and
-type f -a -name '*.pyc' -o -name '*.pyo'
And the find man page says:
Please note that -a when specified implicitly (for example by two tests appearing without an
explicit operator between them) or explicitly has higher precedence than -o. This means that
find . -name afile -o -name bfile -print will never print afile.
...therefore they are interpreted like:
(-type d -a -name test) -o -name tests
and
(-type f -a -name '*.pyc') -o -name '*.pyo'
...which is presumably not what was intended.
I'll open a PR.
The find command here aims to delete unwanted files:
python/Dockerfile-debian.template
Lines 52 to 57 in 761d766
However the inner conditionals used are of form:
-type d -a -name test -o -name testsand
-type f -a -name '*.pyc' -o -name '*.pyo'And the find man page says:
...therefore they are interpreted like:
(-type d -a -name test) -o -name testsand
(-type f -a -name '*.pyc') -o -name '*.pyo'...which is presumably not what was intended.
I'll open a PR.