Skip to content

Commit 9e8c455

Browse files
committed
Skip versions on imports
1 parent a01d477 commit 9e8c455

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

R/controlFiles.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
## or just 'base' in sort(tools:::.get_standard_package_names()$base) which is almost the above
77
## (modulo 'translations')
88

9+
debug <- FALSE
10+
911
.isBasePackage <- function(pkg) {
1012
pkg %in% .basePkgs
1113
}
@@ -40,9 +42,11 @@
4042
.addImports <- function(dt, ap, con) {
4143
if (is.na(dt[,Imports])) return(invisible(NULL))
4244
imp <- gsub("\\n", "", dt[,Imports])
45+
if (debug) print(imp)
4346
imps <- strsplit(imp, ",")[[1]]
4447
for (i in imps) {
4548
i <- trimws(i)
49+
i <- gsub(" ?\\(.*?\\)", "", i)
4650
if (.isBasePackage(i)) next
4751
p <- unique(ap[Package==i, deb])
4852
cat(", ", p ,sep="", file=con, append=TRUE)

0 commit comments

Comments
 (0)