]> git.donarmstrong.com Git - cran2deb.git/blobdiff - trunk/R/debianpkg.R
also treat doMPI as Rmpi and npRmpi and add --no-test-load
[cran2deb.git] / trunk / R / debianpkg.R
index 63aaaddd7237786e9d8d31d2907d8bf71005ad01..b9f7d2c92bd42235fdb0a4286be7025b02e1f780 100644 (file)
@@ -37,6 +37,9 @@ generate_rules <- function(pkg) {
              ,'include /usr/share/R/debian/r-cran.mk'
              ,'',sep='\n')
        ,file=pkg$debfile('rules'))
+    if (pkg$name %in% c("Rmpi", "npRmpi", "doMPI")) {
+        cat("extraInstallFlags=\"--no-test-load\"\n", file=pkg$debfile('rules'), append=TRUE)
+    }      
     Sys.chmod(pkg$debfile('rules'),'0700')
 }
 
@@ -109,18 +112,7 @@ prepare_new_debian <- function(pkg,extra_deps) {
     # says: ``The sources and headers for the compiled code are in src, plus
     # optionally file Makevars or Makefile.'' It seems unlikely that
     # architecture independent code would end up here.
-    if (pkg$is_bundle) {
-        # if it's a bundle, check each of the packages
-        pkg$archdep = F
-        for (pkgname in r_bundle_contains(pkg$name)) {
-            pkg$archdep = file.exists(file.path(pkg$path,pkgname,'src'))
-            if (pkg$archdep) {
-                break
-            }
-        }
-    } else {
-        pkg$archdep = file.exists(file.path(pkg$path,'src'))
-    }
+    pkg$archdep = file.exists(file.path(pkg$path,'src'))
     pkg$arch <- 'all'
     if (pkg$archdep) {
         pkg$arch <- host_arch()