On 11 January 2015 at 14:18, Dirk Eddelbuettel wrote: | | I have the first part done, which was pretty straightforward. Patch below -- | it accepts a new option to R CMD INSTALL and pass it on; if set its value is | used. Tested when set and not set and the right thing happens. | | But in doing this also learned that the worker function is called from the | mkdesc target in share/make/basepkg.mk to deal with the base packages when R | itself is built. So now I may have to resort to configure to pick up a | compile time override passed around by make to R :-/ | | Any good alternative ideas, Martin?
Got it, I think -- simply via an env var. Will post in a fresh reply to the old thread with R Core. Dirk | Dirk | | Index: src/library/tools/R/admin.R | =================================================================== | --- src/library/tools/R/admin.R (revision 67410) | +++ src/library/tools/R/admin.R (working copy) | @@ -21,7 +21,7 @@ | | ## called from basepkg.mk and .install_packages | .install_package_description <- | -function(dir, outDir) | +function(dir, outDir, builtStamp=character()) | { | ## Function for taking the DESCRIPTION package meta-information, | ## checking/validating it, and installing it with the 'Built:' | @@ -66,8 +66,9 @@ | "; ", | if(dir.exists(file.path(dir, "src"))) OStype else "", | "; ", | + ## Some build systems want to supply a package-build timestamp for reproducibility | ## Prefer date in ISO 8601 format, UTC. | - format(Sys.time(), tz = "UTC", usetz = TRUE), | + if (length(builtStamp)==0) format(Sys.time(), tz = "UTC", usetz = TRUE) else builtStamp, | ## Sys.time(), | "; ", | .OStype()) | Index: src/library/tools/R/install.R | =================================================================== | --- src/library/tools/R/install.R (revision 67410) | +++ src/library/tools/R/install.R (working copy) | @@ -180,6 +180,8 @@ | " --configure-vars=VARS", | " set variables for the configure scripts (if any)", | " --dsym (OS X only) generate dSYM directory", | + " --built-timestamp=STAMP", | + " set timestamp for Built: entry in DESCRIPTION", | "\nand on Windows only", | " --force-biarch attempt to build both architectures", | " even if there is a non-empty configure.win", | @@ -652,7 +654,7 @@ | Sys.chmod(file.path(instdir, f), fmode) | } | | - res <- try(.install_package_description('.', instdir)) | + res <- try(.install_package_description('.', instdir, built_stamp)) | if (inherits(res, "try-error")) | pkgerrmsg("installing package DESCRIPTION failed", pkg_name) | if (!file.exists(namespace <- file.path(instdir, "NAMESPACE")) ) { | @@ -1274,6 +1276,7 @@ | resave_data <- FALSE | compact_docs <- FALSE | keep.source <- getOption("keep.source.pkgs") | + built_stamp <- character() | | install_libs <- TRUE | install_R <- TRUE | @@ -1401,6 +1404,8 @@ | byte_compile <- FALSE | } else if (a == "--dsym") { | dsym <- TRUE | + } else if (substr(a, 1, 18) == "--built-timestamp=") { | + built_stamp <- substr(a, 19, 1000) | } else if (substr(a, 1, 1) == "-") { | message("Warning: unknown option ", sQuote(a), domain = NA) | } else pkgs <- c(pkgs, a) | | | -- | http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org