Preserve result returned by apt-get and pip
Change I855ffe9c7a75e9943106af0f70cf715c34ae25c5 and
I368fec44858bd97fc6a314fb20eed2b10932cbb1 added timing
infrastructure which hides the return value of
the main commands. Restore the prior behaviour.
Change-Id: I4a536abefa7824ac6d42e7bbbf1079d9cc055984
Closes-Bug: #1518545
diff --git a/functions-common b/functions-common
index 4a9db34..486dcc5 100644
--- a/functions-common
+++ b/functions-common
@@ -1045,7 +1045,7 @@
# Uses globals ``OFFLINE``, ``*_proxy``
# apt_get operation package [package ...]
function apt_get {
- local xtrace
+ local xtrace result
xtrace=$(set +o | grep xtrace)
set +o xtrace
@@ -1062,9 +1062,11 @@
http_proxy=${http_proxy:-} https_proxy=${https_proxy:-} \
no_proxy=${no_proxy:-} \
apt-get --option "Dpkg::Options::=--force-confold" --assume-yes "$@"
+ result=$?
# stop the clock
time_stop "apt-get"
+ return $result
}
function _parse_package_files {