blob: 4f6000e69eea3af3b631646a480ae0a6f660e5f5 [file] [log] [blame]
Peter Pentchev5006ff62021-10-26 01:28:45 +03001From 46d056ce686691524e835178f0ad6eb14d3c58f3 Mon Sep 17 00:00:00 2001
2From: Peter Penchev <openstack-dev@storpool.com>
3Date: Sun, 6 Sep 2020 16:01:31 +0300
4Subject: [PATCH 1/2] DNM: use eatmydata for apt-get and pip.
5
6Change-Id: I4db4129f8b8f654aa763fafaaefdae5386cbb9a7
7---
8 functions-common | 2 +-
9 inc/python | 5 +++--
10 2 files changed, 4 insertions(+), 3 deletions(-)
11
12diff --git a/functions-common b/functions-common
13index 11679e4a..70a85f7b 100644
14--- a/functions-common
15+++ b/functions-common
16@@ -1114,7 +1114,7 @@ function apt_get {
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
25diff --git a/inc/python b/inc/python
26index 9382d352..f97ebe3a 100644
27--- a/inc/python
28+++ b/inc/python
29@@ -195,6 +195,7 @@ function pip_install {
30 no_proxy="${no_proxy:-}" \
31 PIP_FIND_LINKS=$PIP_FIND_LINKS \
32 SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite \
33+ eatmydata \
34 $cmd_pip $upgrade \
35 $@
36 result=$?
37@@ -216,7 +217,7 @@ function pip_uninstall {
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
46@@ -481,7 +482,7 @@ function install_devstack_tools {
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--
562.30.2
57