Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bugs in vignette handling:

 - do tangling at INSTALL time if necessary
 - don't complain about *.R source files in tarball

git-svn-id: https://svn.r-project.org/R/trunk@62394 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information...
commit 780021752eb83a71e2198019acf069ba8741103b 1 parent 872f61b
murdoch authored
Showing with 25 additions and 24 deletions.
  1. +1 −1  src/library/tools/R/admin.R
  2. +24 −23 src/library/tools/R/check.R
View
2  src/library/tools/R/admin.R
@@ -527,7 +527,7 @@ function(dir, outDir, encoding = "")
## this is needed.
for(i in seq_along(vigns$docs)) {
file <- vigns$docs[i]
- if (!is.null(vigns$sources) && !is.null(vigns$sources[i])) # already there?
+ if (!is.null(vigns$sources) && !is.null(vigns$sources[file][[1]]))
next
file <- basename(file)
enc <- getVignetteEncoding(file, TRUE)
View
47 src/library/tools/R/check.R
@@ -2314,29 +2314,30 @@ setRlibs <-
}
}
- ## Do any of the .R files which will be generated
- ## exist in inst/doc? If so the latter will be ignored,
- sources <-
- basename(list_files_with_exts(file.path(pkgdir, "inst/doc"), "R"))
- custom <- !is.na(desc["VignetteBuilder"])
- if (length(sources) && !custom) {
- new_sources <- paste0(vigns$names, ".R")
- dups <- sources[sources %in% new_sources]
- if(nb <- length(dups)) {
- if(!any) warningLog(Log)
- any <- TRUE
- msg <- ngettext(nb,
- "Unused file in 'inst/doc' which is pointless or misleading",
- "Unused files in 'inst/doc' which are pointless or misleading", domain = NA)
- printLog(Log, " ",
- paste(msg,
- " as they will be re-created from the vignettes:", "",
- sep = "\n"))
- printLog(Log,
- paste(c(paste(" ", dups), "", ""),
- collapse = "\n"))
- }
- }
+# FIXME: we should do this check in build, not here. Currently not doing it at all.
+# ## Do any of the .R files which will be generated
+# ## exist in inst/doc? If so the latter will be ignored,
+# sources <-
+# basename(list_files_with_exts(file.path(pkgdir, "inst/doc"), "R"))
+# custom <- !is.na(desc["VignetteBuilder"])
+# if (length(sources) && !custom) {
+# new_sources <- paste0(vigns$names, ".R")
+# dups <- sources[sources %in% new_sources]
+# if(nb <- length(dups)) {
+# if(!any) warningLog(Log)
+# any <- TRUE
+# msg <- ngettext(nb,
+# "Unused file in 'inst/doc' which is pointless or misleading",
+# "Unused files in 'inst/doc' which are pointless or misleading", domain = NA)
+# printLog(Log, " ",
+# paste(msg,
+# " as they will be re-created from the vignettes:", "",
+# sep = "\n"))
+# printLog(Log,
+# paste(c(paste(" ", dups), "", ""),
+# collapse = "\n"))
+# }
+# }
## avoid case-insensitive matching
if ("makefile" %in% dir(vigns$dir)) {
if(!any) warningLog(Log)
Please sign in to comment.
Something went wrong with that request. Please try again.