From 897f075df0cc3a8e086a5029fe251df3decc1870 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Wed, 8 Oct 2025 01:47:04 +0100 Subject: [PATCH] pr18191 Allowing building of packages which are there own vignette engine --- src/library/tools/R/build.R | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/library/tools/R/build.R b/src/library/tools/R/build.R index bc283ac50cb..d3cab8ce89d 100644 --- a/src/library/tools/R/build.R +++ b/src/library/tools/R/build.R @@ -278,16 +278,20 @@ inRbuildignore <- function(files, pkgdir) { if(file.exists(vignette_index_path)) unlink(vignette_index_path) -## this is not a logical field -## if (nchar(parse_description_field(desc, "VignetteBuilder", ""))) -## ensure_installed() + ## PR#18191: ensure tempory installation so can be checked for a vignette engine + if(desc["Package"] %in% + .get_requires_from_package_db(desc, "VignetteBuilder")) + ensure_installed() ## PR#15775: check VignetteBuilder packages are installed ## This is a bit wasteful: we do not need them in this process - loadVignetteBuilder(pkgdir, TRUE) + ## PR#18191: ensure tempory installation directory is also checked + loadVignetteBuilder(pkgdir, TRUE, lib.loc = c(.libPaths(),libdir)) + ## Look for vignette sources - vigns <- pkgVignettes(dir = '.', check = TRUE) + ## PR#18191: ensure tempory installation directory is also checked + vigns <- pkgVignettes(dir = '.', check = TRUE, lib.loc= c(.libPaths(),libdir)) if (!is.null(vigns) && length(vigns$docs)) { ensure_installed() ## Good to do this in a separate process: it might die