From 370590b93b19bc01cb16ff00cdf649e036b485f3 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 28 Sep 2017 13:32:56 +0200 Subject: [PATCH] update_r_packages: Change the way the debian packages are installed. Now a failure involves that single package and not the whole list. --- R/templates/update_r_packages.sh.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/templates/update_r_packages.sh.j2 b/R/templates/update_r_packages.sh.j2 index c498d037..83aaa977 100644 --- a/R/templates/update_r_packages.sh.j2 +++ b/R/templates/update_r_packages.sh.j2 @@ -139,7 +139,11 @@ function debian_pkgs() { else logger "update_r_packages: APT cache not updated" fi - xargs -a <(awk '/^\s*[^#]/' "$PKGS_LIST") -r -- apt-get install -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" >/var/log/update_r_debs.log 2>&1 + >/var/log/update_r_debs.log + while read deb_pkg ; do + apt-get install ${deb_pkg} -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" >>/var/log/update_r_debs.log 2>&1 + done < $PKGS_LIST + apt-get autoremove -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" >> /var/log/update_r_debs.log 2>&1 else logger "update_r_packages: skipping the debian packages installation" fi