update_r_packages.sh: remove the lock files that install.packages() fails to delete.
This commit is contained in:
parent
732fa3f959
commit
67ede2004e
|
@ -16,9 +16,10 @@ r_install_cran_repo: absent
|
|||
r_cran_set_default_mirror: True
|
||||
r_cran_mirror_site: https://cran.mirror.garr.it/mirrors/CRAN/
|
||||
r_base_specific_version: False
|
||||
r_base_pkg_version: 2.14.1
|
||||
r_base_pkg_version: 3.4.3
|
||||
r_packages_main_state: present
|
||||
r_packages_state: '{{ r_packages_main_state }}'
|
||||
r_sitelib_path: '/usr/local/lib/R/site-library'
|
||||
r_plugins_from_deb: True
|
||||
r_packages_cleanup: False
|
||||
#
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
file: dest={{ r_packages_svn_base_dir }} state=directory
|
||||
|
||||
- name: Cron job that installs new R packages, if any
|
||||
cron: name="install new R packages" user=root cron_file=install-r-packages minute="*/10" hour="5-0,1-2" job="/usr/local/bin/update_r_packages install >/var/log/install_r_packages 2>&1" state=present
|
||||
cron: name="install new R packages" user=root cron_file=install-r-packages minute="*/10" hour="5-23,1-2" job="/usr/local/bin/update_r_packages install >/var/log/install_r_packages 2>&1" state=present
|
||||
|
||||
- name: Cron job that upgrades existing R packages and installs new ones, if any
|
||||
cron: name="install new R packages" user=root cron_file=upgrade-r-packages minute="7" hour="3" job="/usr/local/bin/update_r_packages upgrade >/var/log/update_r_packages 2>&1" state=present
|
||||
|
|
|
@ -163,6 +163,11 @@ function debian_pkgs() {
|
|||
fi
|
||||
}
|
||||
|
||||
function remove_r_install_packages_lock_files() {
|
||||
# install.packages leaves lock files around if the process crashes
|
||||
rm -fr {{ r_sitelib_path }}/00LOCK-*
|
||||
}
|
||||
|
||||
function r_cran_pkgs() {
|
||||
if [ $CRAN_PKGS_SKIP -eq 0 ] ; then
|
||||
logger "update_r_packages: Installing R packages from CRAN"
|
||||
|
@ -221,6 +226,7 @@ else
|
|||
get_data_files
|
||||
fi
|
||||
debian_pkgs
|
||||
remove_r_install_packages_lock_files
|
||||
r_cran_pkgs
|
||||
r_github_pkgs
|
||||
cleanup
|
||||
|
|
Loading…
Reference in New Issue