blob: b3564180b19553aa4fa486ab1ad61b53f5293595 [file] [log] [blame]
Peter Pentchev0d4b05f2022-05-25 02:09:24 +03001From c4219b81032a4208e765e862f60a7714009be963 Mon Sep 17 00:00:00 2001
Peter Pentchev5006ff62021-10-26 01:28:45 +03002From: Peter Penchev <openstack-dev@storpool.com>
3Date: Sun, 6 Sep 2020 16:01:31 +0300
Peter Pentchev0d4b05f2022-05-25 02:09:24 +03004Subject: [PATCH] DNM: use eatmydata for apt-get and pip.
Peter Pentchev5006ff62021-10-26 01:28:45 +03005
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
Peter Pentchev0d4b05f2022-05-25 02:09:24 +030013index be966e96..d859fcd1 100644
Peter Pentchev5006ff62021-10-26 01:28:45 +030014--- a/functions-common
15+++ b/functions-common
Peter Pentchev0d4b05f2022-05-25 02:09:24 +030016@@ -1231,7 +1231,7 @@ function apt_get {
Peter Pentchev5006ff62021-10-26 01:28:45 +030017 $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
Peter Pentchev0d4b05f2022-05-25 02:09:24 +030026index d032a10e..cef012fc 100644
Peter Pentchev5006ff62021-10-26 01:28:45 +030027--- a/inc/python
28+++ b/inc/python
Peter Pentchev0d4b05f2022-05-25 02:09:24 +030029@@ -194,6 +194,7 @@ function pip_install {
30 https_proxy="${https_proxy:-}" \
Peter Pentchev5006ff62021-10-26 01:28:45 +030031 no_proxy="${no_proxy:-}" \
32 PIP_FIND_LINKS=$PIP_FIND_LINKS \
Peter Pentchev5006ff62021-10-26 01:28:45 +030033+ eatmydata \
34 $cmd_pip $upgrade \
35 $@
36 result=$?
Peter Pentchev0d4b05f2022-05-25 02:09:24 +030037@@ -215,7 +216,7 @@ function pip_uninstall {
Peter Pentchev5006ff62021-10-26 01:28:45 +030038 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 Pentchev0d4b05f2022-05-25 02:09:24 +030046@@ -480,7 +481,7 @@ function install_devstack_tools {
Peter Pentchev5006ff62021-10-26 01:28:45 +030047 # 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 Pentchev0d4b05f2022-05-25 02:09:24 +0300562.35.1
Peter Pentchev5006ff62021-10-26 01:28:45 +030057