From ac6d0bb83dbdff828bc02541460a7327432f3c2d Mon Sep 17 00:00:00 2001
From: Mick Jordan <mick.jordan@oracle.com>
Date: Fri, 4 Nov 2016 17:06:37 -0700
Subject: [PATCH] install order matters for recommended packages

---
 com.oracle.truffle.r.native.recommended/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/com.oracle.truffle.r.native.recommended/Makefile b/com.oracle.truffle.r.native.recommended/Makefile
index 0b26a47e96..3d63321e40 100644
--- a/com.oracle.truffle.r.native.recommended/Makefile
+++ b/com.oracle.truffle.r.native.recommended/Makefile
@@ -33,10 +33,10 @@ FASTR_R_HOME := $(abspath $(CURDIR)/..)
 NATIVE_PROJECT := $(subst native.recommended,native,$(CURDIR))
 R_VERSION := $(notdir $(wildcard $(NATIVE_PROJECT)/gnur/R-*))
 GNUR_HOME := $(NATIVE_PROJECT)/gnur/$(R_VERSION)
-GNUR_RECOMMENDED_TARS := $(wildcard $(GNUR_HOME)/src/library/Recommended/*.tgz)
+# order matters due to inter-package dependencies
+GNUR_RECOMMENDED_PKGNAMES := MASS boot class cluster codetools lattice nnet spatial Matrix survival KernSmooth foreign nlme rpart
+GNUR_RECOMMENDED_TARS := $(foreach pkg, $(GNUR_RECOMMENDED_PKGNAMES),$(GNUR_HOME)/src/library/Recommended/$(pkg).tgz)
 #$(info GNUR_RECOMMENDED_TARS=$(GNUR_RECOMMENDED_TARS))
-GNUR_RECOMMENDED_PKGNAMES := $(foreach tar,$(GNUR_RECOMMENDED_TARS),$(notdir $(basename $(tar))))
-#$(info GNUR_RECOMMENDED_PKGNAMES=$(GNUR_RECOMMENDED_PKGNAMES))
 
 all: install.recommended
 
-- 
GitLab