From d0906ad47372a794f0a01386542171dab047ff19 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Thu, 7 Feb 2019 10:56:29 +1100 Subject: [PATCH] pip-and-virtualenv: handle centos image-based builds This fixes a regression in I041a141366099093805e6052b1bbf64efd277e1e where we starting skipping the removal of old files for image-based builds (confusingly named centos7 rather than centos for historical reasons). Fix the check Change-Id: I74688a9e91d833b5d654056431729bed0585616c --- .../install.d/pip-and-virtualenv-source-install/04-install-pip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip b/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip index 33524f296..457e28483 100755 --- a/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip +++ b/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip @@ -76,7 +76,7 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel7) ]]; then # tools run with "python3 -Es" to isolate themselves to the # package installed versions. So we definitely don't want to # clear the packaged versions out in that case. - if [[ $DISTRO_NAME == "centos" ]]; then + if [[ $DISTRO_NAME =~ (centos|centos7|rhel7) ]]; then for pkg in $packages; do rpm -ql $pkg | xargs rm -rf done