From 5d86c858d58f84b8dd1274ac61ac1c9c9ebc7739 Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Mon, 17 Jul 2017 16:35:29 +0100 Subject: [PATCH] Correct operator precedence in find conditionals Previously the `type` option was only being applied to the first `-name` option, rather than both. Fixes #212. --- 2.7/Dockerfile | 8 ++++---- 2.7/alpine/Dockerfile | 8 ++++---- 2.7/alpine3.6/Dockerfile | 8 ++++---- 2.7/slim/Dockerfile | 8 ++++---- 2.7/wheezy/Dockerfile | 8 ++++---- 3.3/Dockerfile | 8 ++++---- 3.3/alpine/Dockerfile | 8 ++++---- 3.3/slim/Dockerfile | 8 ++++---- 3.3/wheezy/Dockerfile | 8 ++++---- 3.4/Dockerfile | 8 ++++---- 3.4/alpine/Dockerfile | 8 ++++---- 3.4/slim/Dockerfile | 8 ++++---- 3.4/wheezy/Dockerfile | 8 ++++---- 3.5/Dockerfile | 8 ++++---- 3.5/alpine/Dockerfile | 8 ++++---- 3.5/slim/Dockerfile | 8 ++++---- 3.6/Dockerfile | 8 ++++---- 3.6/alpine/Dockerfile | 8 ++++---- 3.6/alpine3.6/Dockerfile | 8 ++++---- 3.6/slim/Dockerfile | 8 ++++---- Dockerfile-alpine.template | 8 ++++---- Dockerfile-debian.template | 8 ++++---- Dockerfile-slim.template | 8 ++++---- 23 files changed, 92 insertions(+), 92 deletions(-) diff --git a/2.7/Dockerfile b/2.7/Dockerfile index c79e9cfa5..9f8987c87 100644 --- a/2.7/Dockerfile +++ b/2.7/Dockerfile @@ -48,9 +48,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -70,9 +70,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/2.7/alpine/Dockerfile b/2.7/alpine/Dockerfile index 2e2a5a064..b0d688f85 100644 --- a/2.7/alpine/Dockerfile +++ b/2.7/alpine/Dockerfile @@ -74,9 +74,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -100,9 +100,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/2.7/alpine3.6/Dockerfile b/2.7/alpine3.6/Dockerfile index 609cb9c56..42d0a1923 100644 --- a/2.7/alpine3.6/Dockerfile +++ b/2.7/alpine3.6/Dockerfile @@ -74,9 +74,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -100,9 +100,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/2.7/slim/Dockerfile b/2.7/slim/Dockerfile index 0c8aa8dfa..d3180335d 100644 --- a/2.7/slim/Dockerfile +++ b/2.7/slim/Dockerfile @@ -63,9 +63,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -91,9 +91,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/2.7/wheezy/Dockerfile b/2.7/wheezy/Dockerfile index 9fe1bf912..a592c51eb 100644 --- a/2.7/wheezy/Dockerfile +++ b/2.7/wheezy/Dockerfile @@ -48,9 +48,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -70,9 +70,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/3.3/Dockerfile b/3.3/Dockerfile index 539cc7c3d..d73009748 100644 --- a/3.3/Dockerfile +++ b/3.3/Dockerfile @@ -57,9 +57,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -86,9 +86,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/3.3/alpine/Dockerfile b/3.3/alpine/Dockerfile index 419e1d83c..d10044672 100644 --- a/3.3/alpine/Dockerfile +++ b/3.3/alpine/Dockerfile @@ -86,9 +86,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -119,9 +119,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/3.3/slim/Dockerfile b/3.3/slim/Dockerfile index 194009d16..49c5688d0 100644 --- a/3.3/slim/Dockerfile +++ b/3.3/slim/Dockerfile @@ -76,9 +76,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -111,9 +111,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/3.3/wheezy/Dockerfile b/3.3/wheezy/Dockerfile index 5738e9170..ba55fcd18 100644 --- a/3.3/wheezy/Dockerfile +++ b/3.3/wheezy/Dockerfile @@ -57,9 +57,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -86,9 +86,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/3.4/Dockerfile b/3.4/Dockerfile index a5d2e57ed..292b7bcaf 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -57,9 +57,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -86,9 +86,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/3.4/alpine/Dockerfile b/3.4/alpine/Dockerfile index 3d85af963..28107239c 100644 --- a/3.4/alpine/Dockerfile +++ b/3.4/alpine/Dockerfile @@ -86,9 +86,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -119,9 +119,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/3.4/slim/Dockerfile b/3.4/slim/Dockerfile index c8d983da3..aa56978f6 100644 --- a/3.4/slim/Dockerfile +++ b/3.4/slim/Dockerfile @@ -76,9 +76,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -111,9 +111,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/3.4/wheezy/Dockerfile b/3.4/wheezy/Dockerfile index d9008ab94..3a8e4cb46 100644 --- a/3.4/wheezy/Dockerfile +++ b/3.4/wheezy/Dockerfile @@ -57,9 +57,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -86,9 +86,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/3.5/Dockerfile b/3.5/Dockerfile index 73b63f3b5..e6085da61 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -57,9 +57,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -86,9 +86,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/3.5/alpine/Dockerfile b/3.5/alpine/Dockerfile index 5b0160018..c878ca76f 100644 --- a/3.5/alpine/Dockerfile +++ b/3.5/alpine/Dockerfile @@ -86,9 +86,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -119,9 +119,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/3.5/slim/Dockerfile b/3.5/slim/Dockerfile index 61039b19a..38c8a5b2c 100644 --- a/3.5/slim/Dockerfile +++ b/3.5/slim/Dockerfile @@ -76,9 +76,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -111,9 +111,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/3.6/Dockerfile b/3.6/Dockerfile index 2a2a29009..e902a08d3 100644 --- a/3.6/Dockerfile +++ b/3.6/Dockerfile @@ -57,9 +57,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -86,9 +86,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/3.6/alpine/Dockerfile b/3.6/alpine/Dockerfile index 480029948..9fbe0c7b1 100644 --- a/3.6/alpine/Dockerfile +++ b/3.6/alpine/Dockerfile @@ -86,9 +86,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -119,9 +119,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/3.6/alpine3.6/Dockerfile b/3.6/alpine3.6/Dockerfile index 87a3effa3..52c5f5330 100644 --- a/3.6/alpine3.6/Dockerfile +++ b/3.6/alpine3.6/Dockerfile @@ -86,9 +86,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -119,9 +119,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/3.6/slim/Dockerfile b/3.6/slim/Dockerfile index 109154452..875233f66 100644 --- a/3.6/slim/Dockerfile +++ b/3.6/slim/Dockerfile @@ -76,9 +76,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -111,9 +111,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 40dd0f2fb..091049c95 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -80,9 +80,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -113,9 +113,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 2f6dfaf06..4fe2f6bd0 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -51,9 +51,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -80,9 +80,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py diff --git a/Dockerfile-slim.template b/Dockerfile-slim.template index 1068e587e..643300733 100644 --- a/Dockerfile-slim.template +++ b/Dockerfile-slim.template @@ -70,9 +70,9 @@ RUN set -ex \ \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python @@ -105,9 +105,9 @@ RUN set -ex; \ \ find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ + \( -type d -a \( -name test -o -name tests \) \) \ -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' +; \ rm -f get-pip.py