From ba2d9ab5b24c2b42de42e0d55d0d9b6dc5d6a635 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 5 May 2017 16:12:21 +0200 Subject: [PATCH] library/roles/R: Change the R updater script so that we can add a prefix to the files. --- R/defaults/main.yml | 1 + R/templates/update_r_packages.sh.j2 | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/R/defaults/main.yml b/R/defaults/main.yml index e27b8f2..a4c6092 100644 --- a/R/defaults/main.yml +++ b/R/defaults/main.yml @@ -26,6 +26,7 @@ r_packages_updater: False r_package_updater_via_subversion: True r_package_updater_subversion_repo: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-analysis/RConfiguration/RPackagesManagement/ r_packages_svn_base_dir: /srv/r_updater +r_packages_svn_files_prefix: '' # They need to be flat text files # 1 package per line #r_debian_packages_list_url diff --git a/R/templates/update_r_packages.sh.j2 b/R/templates/update_r_packages.sh.j2 index 1bc3d2d..c498d03 100644 --- a/R/templates/update_r_packages.sh.j2 +++ b/R/templates/update_r_packages.sh.j2 @@ -18,6 +18,7 @@ R_PKGS_FROM_SVN={{ r_package_updater_via_subversion }} R_PKGS_SVN_DIR=RPackagesManagement R_PKGS_SVN_URL={{ r_package_updater_subversion_repo }} R_PKGS_SVN_BASE_DIR={{ r_packages_svn_base_dir }} +R_PKGS_FILES_PREFIX={{ r_packages_svn_files_prefix }} # - debian packages list format: # one package per line DEB_PKGS_SKIP=0 @@ -124,9 +125,9 @@ function get_data_files_from_svn() { logger "update_r_packages: first SVN checkout." svn co $R_PKGS_SVN_URL >/dev/null 2>&1 fi - PKGS_LIST=$R_PKGS_SVN_BASE_DIR/$R_PKGS_SVN_DIR/r_deb_pkgs.txt - R_PKGS_LIST=$R_PKGS_SVN_BASE_DIR/$R_PKGS_SVN_DIR/r_cran_pkgs.txt - R_PKGS_GITHUB=$R_PKGS_SVN_BASE_DIR/$R_PKGS_SVN_DIR/r_github_pkgs.txt + PKGS_LIST=$R_PKGS_SVN_BASE_DIR/$R_PKGS_SVN_DIR/${R_PKGS_FILES_PREFIX}r_deb_pkgs.txt + R_PKGS_LIST=$R_PKGS_SVN_BASE_DIR/$R_PKGS_SVN_DIR/${R_PKGS_FILES_PREFIX}r_cran_pkgs.txt + R_PKGS_GITHUB=$R_PKGS_SVN_BASE_DIR/$R_PKGS_SVN_DIR/${R_PKGS_FILES_PREFIX}r_github_pkgs.txt } function debian_pkgs() {