You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2021/04/13 14:27:16 UTC
[incubator-datalab] 02/04: [DATALAB-2091]: fixed R lib versions list
This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch DATALAB-2091
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit 7fdb877a5f7ddaae50b6ea6543e86b686aa373d5
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Tue Apr 13 13:21:52 2021 +0300
[DATALAB-2091]: fixed R lib versions list
---
infrastructure-provisioning/src/general/lib/os/fab.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index 6e4b31e..de00201 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -486,12 +486,12 @@ def install_r_pkg(requisites):
status_msg = 'invalid_name'
elif res:
ansi_escape = re.compile(r'\x1b[^m]*m')
- version = ansi_escape.sub('', res).split("\r\n")[0].split('"')[1]
+ version = ansi_escape.sub('', res).split("\n")[0].split('"')[1]
status_msg = 'installed'
if 'Error in download_version_url(package, version, repos, type) :' in err or 'Error in parse_deps(paste(spec,' in err:
conn.sudo('R -e \'install.packages("versions", repos="https://cloud.r-project.org", dep=TRUE)\'')
versions = conn.sudo('R -e \'library(versions); available.versions("' + name + '")\' 2>&1 | grep -A 50 '
- '\'date available\' | awk \'{print $2}\'').stdout.replace('\r\n', ' ')[5:].split(' ')
+ '\'date available\' | awk \'{print $2}\'').stdout.replace('\n', ' ')[5:].split(' ')
if versions != ['']:
status_msg = 'invalid_version'
else:
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org