You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by lf...@apache.org on 2020/08/10 13:57:43 UTC

[incubator-dlab] 03/05: [DLAB-1974]: fixed some bugs

This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DLAB-1974
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 2070e05bc83f489581d5698d3dfb0d4e62afcc31
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Mon Aug 10 15:01:06 2020 +0300

    [DLAB-1974]: fixed some bugs
---
 infrastructure-provisioning/src/general/lib/os/fab.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index a200a88..cc0f940 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -74,16 +74,17 @@ def install_pip_pkg(requisites, pip_version, lib_group):
             sudo('{0} install -U {1} --no-cache-dir 2>&1 | tee /tmp/tee.tmp; if ! grep -w -i -E  "({2})" /tmp/tee.tmp > '
                  ' /tmp/{0}install_{3}.log; then  echo "" > /tmp/{0}install_{3}.log;fi'.format(pip_version, pip_pkg, error_parser, name))
             err = sudo('cat /tmp/{0}install_{1}.log'.format(pip_version, pip_pkg.split("==")[0])).replace('"', "'")
-            sudo('{0} freeze | if ! grep -w -i {1} > /tmp/{0}install_{1}.list; then  echo "" > /tmp/{0}install_{1}.list;fi'.format(pip_version, name))
+            sudo('{0} freeze --all | if ! grep -w -i {1} > /tmp/{0}install_{1}.list; then  echo "" > /tmp/{0}install_{1}.list;fi'.format(pip_version, name))
             res = sudo('cat /tmp/{0}install_{1}.list'.format(pip_version, name))
+            installed_out = sudo('cat /tmp/tee.tmp | grep "Successfully installed"')
             changed_pip_pkg = False
             if res == '':
                 changed_pip_pkg = pip_pkg.split("==")[0].replace("_", "-").split('-')
                 changed_pip_pkg = changed_pip_pkg[0]
-                sudo('{0} freeze | if ! grep -w -i {1} > /tmp/{0}install_{1}.list; then  echo "" > '
+                sudo('{0} freeze --all | if ! grep -w -i {1} > /tmp/{0}install_{1}.list; then  echo "" > '
                      '/tmp/{0}install_{1}.list;fi'.format(pip_version, changed_pip_pkg))
                 res = sudo('cat /tmp/{0}install_{1}.list'.format(pip_version, changed_pip_pkg))
-            if err:
+            if err and name not in installed_out:
                 status_msg = 'installation_error'
             elif res:
                 res = res.lower()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org