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 af2f229ab1f8dcb7883c35ebfe5a92b597e30935 Author: leonidfrolov <[email protected]> AuthorDate: Fri Aug 7 15:01:29 2020 +0300 [DLAB-1974]: added additional check in case in R package version are invalid characters --- infrastructure-provisioning/src/general/lib/os/fab.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py index 55c1fc3..1b57861 100644 --- a/infrastructure-provisioning/src/general/lib/os/fab.py +++ b/infrastructure-provisioning/src/general/lib/os/fab.py @@ -468,12 +468,14 @@ def install_r_pkg(requisites): ansi_escape = re.compile(r'\x1b[^m]*m') version = ansi_escape.sub('', res).split("\r\n")[0].split('"')[1] status_msg = 'installed' - if 'Error in download_version_url(package, version, repos, type) :' in err: + if 'Error in download_version_url(package, version, repos, type) :' in err or 'Error in parse_deps(paste(spec,' in err: sudo('R -e \'install.packages("versions", repos="https://cloud.r-project.org", dep=TRUE)\'') versions = sudo('R -e \'library(versions); available.versions("' + name + '")\' 2>&1 | grep -A 50 ' '\'date available\' | awk \'{print $2}\'').replace('\r\n', ' ')[5:].split(' ') if versions != ['']: status_msg = 'invalid_version' + else: + versions = [] else: versions = [] status.append({"group": "r_pkg", "name": name, "version": version, "status": status_msg, "error_message": err, "available_versions": versions, "add_pkgs": dep}) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
