assignUser commented on code in PR #38236:
URL: https://github.com/apache/arrow/pull/38236#discussion_r1369473915
##########
r/tools/nixlibs.R:
##########
@@ -15,35 +15,55 @@
# specific language governing permissions and limitations
# under the License.
-args <- commandArgs(TRUE)
-VERSION <- args[1]
-dst_dir <- paste0("libarrow/arrow-", VERSION)
-
-# TESTING is set in test-nixlibs.R; it won't be set when called from configure
-test_mode <- exists("TESTING")
+#### Fuctions #### check end of file for main logic
+env_is <- function(var, value) identical(tolower(Sys.getenv(var)), value)
-# Prevent error with binary selection during testing.
-if (test_mode && is.na(VERSION)) {
- VERSION <- "8.0.0.9000"
+# Log messages in the style of the configure script
+lg <- function(..., .indent = "***") {
+ cat(.indent, " ", sprintf(...), "\n", sep = "")
}
-dev_version <- package_version(VERSION)[1, 4]
-is_release <- is.na(dev_version) || dev_version < "100"
-on_macos <- tolower(Sys.info()[["sysname"]]) == "darwin"
-checksum_path <- Sys.getenv("ARROW_R_CHECKSUM_PATH", "tools/checksums")
+del <- function(path) {
+ options(.arrow.cleanup = c(getOption(".arrow.cleanup"), path))
+}
-# Small dev versions are added for R-only changes during CRAN submission.
-if (is_release) {
- VERSION <- package_version(VERSION)[1, 1:3]
- arrow_repo <- paste0(getOption("arrow.repo",
sprintf("https://apache.jfrog.io/artifactory/arrow/r/%s", VERSION)),
"/libarrow/")
-} else {
- arrow_repo <- paste0(getOption("arrow.dev_repo",
"https://nightlies.apache.org/arrow/r"), "/libarrow/")
+# Exit the script after logging with .status=1 instead of throwing an error
+exit <- function(..., .status = 1) {
+ lg(...)
+ q(save = "no", status = .status)
}
-options(.arrow.cleanup = character()) # To collect dirs to rm on exit
-on.exit(unlink(getOption(".arrow.cleanup")))
-env_is <- function(var, value) identical(tolower(Sys.getenv(var)), value)
+# checks the nightly repo for the latest nightly version X.Y.Z.100<dev>
+find_latest_nightly <- function(description_version) {
Review Comment:
I opened #38430 and I think it would make sense to add these changes there
rather than spread them across 2 PRs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]