Peter Pentchev | 0d4b05f | 2022-05-25 02:09:24 +0300 | [diff] [blame] | 1 | From c4219b81032a4208e765e862f60a7714009be963 Mon Sep 17 00:00:00 2001 |
Peter Pentchev | 5006ff6 | 2021-10-26 01:28:45 +0300 | [diff] [blame] | 2 | From: Peter Penchev <openstack-dev@storpool.com> |
| 3 | Date: Sun, 6 Sep 2020 16:01:31 +0300 |
Peter Pentchev | 0d4b05f | 2022-05-25 02:09:24 +0300 | [diff] [blame] | 4 | Subject: [PATCH] DNM: use eatmydata for apt-get and pip. |
Peter Pentchev | 5006ff6 | 2021-10-26 01:28:45 +0300 | [diff] [blame] | 5 | |
| 6 | Change-Id: I4db4129f8b8f654aa763fafaaefdae5386cbb9a7 |
| 7 | --- |
| 8 | functions-common | 2 +- |
| 9 | inc/python | 5 +++-- |
| 10 | 2 files changed, 4 insertions(+), 3 deletions(-) |
| 11 | |
| 12 | diff --git a/functions-common b/functions-common |
Peter Pentchev | 0d4b05f | 2022-05-25 02:09:24 +0300 | [diff] [blame] | 13 | index be966e96..d859fcd1 100644 |
Peter Pentchev | 5006ff6 | 2021-10-26 01:28:45 +0300 | [diff] [blame] | 14 | --- a/functions-common |
| 15 | +++ b/functions-common |
Peter Pentchev | 0d4b05f | 2022-05-25 02:09:24 +0300 | [diff] [blame] | 16 | @@ -1231,7 +1231,7 @@ function apt_get { |
Peter Pentchev | 5006ff6 | 2021-10-26 01:28:45 +0300 | [diff] [blame] | 17 | $sudo DEBIAN_FRONTEND=noninteractive \ |
| 18 | http_proxy=${http_proxy:-} https_proxy=${https_proxy:-} \ |
| 19 | no_proxy=${no_proxy:-} \ |
| 20 | - apt-get --option "Dpkg::Options::=--force-confold" --assume-yes "$@" < /dev/null |
| 21 | + eatmydata apt-get --option "Dpkg::Options::=--force-confold" --assume-yes "$@" < /dev/null |
| 22 | result=$? |
| 23 | |
| 24 | # stop the clock |
| 25 | diff --git a/inc/python b/inc/python |
Peter Pentchev | 0d4b05f | 2022-05-25 02:09:24 +0300 | [diff] [blame] | 26 | index d032a10e..cef012fc 100644 |
Peter Pentchev | 5006ff6 | 2021-10-26 01:28:45 +0300 | [diff] [blame] | 27 | --- a/inc/python |
| 28 | +++ b/inc/python |
Peter Pentchev | 0d4b05f | 2022-05-25 02:09:24 +0300 | [diff] [blame] | 29 | @@ -194,6 +194,7 @@ function pip_install { |
| 30 | https_proxy="${https_proxy:-}" \ |
Peter Pentchev | 5006ff6 | 2021-10-26 01:28:45 +0300 | [diff] [blame] | 31 | no_proxy="${no_proxy:-}" \ |
| 32 | PIP_FIND_LINKS=$PIP_FIND_LINKS \ |
Peter Pentchev | 5006ff6 | 2021-10-26 01:28:45 +0300 | [diff] [blame] | 33 | + eatmydata \ |
| 34 | $cmd_pip $upgrade \ |
| 35 | $@ |
| 36 | result=$? |
Peter Pentchev | 0d4b05f | 2022-05-25 02:09:24 +0300 | [diff] [blame] | 37 | @@ -215,7 +216,7 @@ function pip_uninstall { |
Peter Pentchev | 5006ff6 | 2021-10-26 01:28:45 +0300 | [diff] [blame] | 38 | local sudo_pip="sudo -H LC_ALL=en_US.UTF-8" |
| 39 | fi |
| 40 | # don't error if we can't uninstall, it might not be there |
| 41 | - $sudo_pip $cmd_pip uninstall -y $name || /bin/true |
| 42 | + $sudo_pip eatmydata $cmd_pip uninstall -y $name || /bin/true |
| 43 | } |
| 44 | |
| 45 | # get version of a package from global requirements file |
Peter Pentchev | 0d4b05f | 2022-05-25 02:09:24 +0300 | [diff] [blame] | 46 | @@ -480,7 +481,7 @@ function install_devstack_tools { |
Peter Pentchev | 5006ff6 | 2021-10-26 01:28:45 +0300 | [diff] [blame] | 47 | # intentionally old to ensure devstack-gate has control |
| 48 | local dstools_version=${DSTOOLS_VERSION:-0.1.2} |
| 49 | install_python3 |
| 50 | - sudo pip3 install -U devstack-tools==${dstools_version} |
| 51 | + sudo eatmydata pip3 install -U devstack-tools==${dstools_version} |
| 52 | } |
| 53 | |
| 54 | # Restore xtrace |
| 55 | -- |
Peter Pentchev | 0d4b05f | 2022-05-25 02:09:24 +0300 | [diff] [blame] | 56 | 2.35.1 |
Peter Pentchev | 5006ff6 | 2021-10-26 01:28:45 +0300 | [diff] [blame] | 57 | |