From 81e04c7a1fef330587dd6be51c4673f2dcfa9061 Mon Sep 17 00:00:00 2001 From: hornik Date: Sat, 28 Sep 2024 10:05:42 +0000 Subject: [PATCH] Simplify dealing with CRAN incoming check results. git-svn-id: https://svn.r-project.org/R/trunk@87196 00db46b3-68df-0310-9c12-caf00c1e9a41 --- src/library/tools/R/check.R | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/src/library/tools/R/check.R b/src/library/tools/R/check.R index 9338a226d63..fa7b5da1f16 100644 --- a/src/library/tools/R/check.R +++ b/src/library/tools/R/check.R @@ -6470,25 +6470,13 @@ add_dummies <- function(dir, Log) if(length(out) == 1L && startsWith(out, "Maintainer: ")) { ## Special-case when there is only the maintainer ## address to note (if at all). - maintainer <- res$Maintainer - ## - ## Env var _R_CHECK_MAINTAINER_ADDRESS_ seems unused? - if(nzchar(maintainer) && - identical(maintainer, - Sys.getenv("_R_CHECK_MAINTAINER_ADDRESS_"))) { - resultLog(Log, "OK") - out <- character() - } - ## - else { - ## - ## Why do we want to note the maintainer address? - if(R_check_use_log_info) - infoLog(Log) - else - resultLog(Log, "Note_to_CRAN_maintainers") - ## - } + ## We used to note via 'Note_to_CRAN_maintainers' unless + ## it agreed with the _R_CHECK_MAINTAINER_ADDRESS_ env + ## var which apparently never got used. + ## As of 2024-09, nobody remembers why we did either: so + ## simply say OK. + resultLog(Log, "OK") + out <- character() } else if(length(res$bad_package)) { errorLog(Log) bad <- TRUE @@ -6516,7 +6504,8 @@ add_dummies <- function(dir, Log) noteLog(Log) } else resultLog(Log, "OK") - printLog0(Log, c(paste(out, collapse = "\n\n"), "\n")) + if(length(out)) + printLog0(Log, c(paste(out, collapse = "\n\n"), "\n")) if(bad) maybe_exit(1L) } else resultLog(Log, "OK") }