jonkeane commented on code in PR #39587: URL: https://github.com/apache/arrow/pull/39587#discussion_r1451836823
########## r/tools/nixlibs.R: ########## @@ -116,33 +105,56 @@ download_binary <- function(lib) { # validate binary checksum for CRAN release only if (!skip_checksum && dir.exists(checksum_path) && is_release || enforce_checksum) { + # Munge the path to the correct sha file which we include during the + # release process checksum_file <- sub(".+/bin/(.+\\.zip)", "\\1\\.sha512", binary_url) checksum_file <- file.path(checksum_path, checksum_file) - checksum_cmd <- "shasum" - checksum_args <- c("--status", "-a", "512", "-c", checksum_file) - - # shasum is not available on all linux versions - status_shasum <- try( - suppressWarnings( - system2("shasum", args = c("--help"), stdout = FALSE, stderr = FALSE) - ), - silent = TRUE - ) - if (inherits(status_shasum, "try-error") || is.integer(status_shasum) && status_shasum != 0) { + # Check for `shasum`, and try `sha512sum` if not found + if (nzchar(Sys.which("shasum"))) { + checksum_cmd <- "shasum" + checksum_args <- c("--status", "-a", "512", "-c", checksum_file) + } else { Review Comment: Ooph, thanks for digging into that. I'll send a fix for that. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org