| From 46d056ce686691524e835178f0ad6eb14d3c58f3 Mon Sep 17 00:00:00 2001 |
| From: Peter Penchev <openstack-dev@storpool.com> |
| Date: Sun, 6 Sep 2020 16:01:31 +0300 |
| Subject: [PATCH 1/2] DNM: use eatmydata for apt-get and pip. |
| |
| Change-Id: I4db4129f8b8f654aa763fafaaefdae5386cbb9a7 |
| --- |
| functions-common | 2 +- |
| inc/python | 5 +++-- |
| 2 files changed, 4 insertions(+), 3 deletions(-) |
| |
| diff --git a/functions-common b/functions-common |
| index 11679e4a..70a85f7b 100644 |
| --- a/functions-common |
| +++ b/functions-common |
| @@ -1114,7 +1114,7 @@ function apt_get { |
| $sudo DEBIAN_FRONTEND=noninteractive \ |
| http_proxy=${http_proxy:-} https_proxy=${https_proxy:-} \ |
| no_proxy=${no_proxy:-} \ |
| - apt-get --option "Dpkg::Options::=--force-confold" --assume-yes "$@" < /dev/null |
| + eatmydata apt-get --option "Dpkg::Options::=--force-confold" --assume-yes "$@" < /dev/null |
| result=$? |
| |
| # stop the clock |
| diff --git a/inc/python b/inc/python |
| index 9382d352..f97ebe3a 100644 |
| --- a/inc/python |
| +++ b/inc/python |
| @@ -195,6 +195,7 @@ function pip_install { |
| no_proxy="${no_proxy:-}" \ |
| PIP_FIND_LINKS=$PIP_FIND_LINKS \ |
| SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite \ |
| + eatmydata \ |
| $cmd_pip $upgrade \ |
| $@ |
| result=$? |
| @@ -216,7 +217,7 @@ function pip_uninstall { |
| local sudo_pip="sudo -H LC_ALL=en_US.UTF-8" |
| fi |
| # don't error if we can't uninstall, it might not be there |
| - $sudo_pip $cmd_pip uninstall -y $name || /bin/true |
| + $sudo_pip eatmydata $cmd_pip uninstall -y $name || /bin/true |
| } |
| |
| # get version of a package from global requirements file |
| @@ -481,7 +482,7 @@ function install_devstack_tools { |
| # intentionally old to ensure devstack-gate has control |
| local dstools_version=${DSTOOLS_VERSION:-0.1.2} |
| install_python3 |
| - sudo pip3 install -U devstack-tools==${dstools_version} |
| + sudo eatmydata pip3 install -U devstack-tools==${dstools_version} |
| } |
| |
| # Restore xtrace |
| -- |
| 2.30.2 |
| |