Skip to content

Commit

Permalink
GH-40227: [R] ensure executable files in `create_package_with_all_dep…
Browse files Browse the repository at this point in the history
…endencies` (#40232)

### What changes are included in this PR?

-  Set the `utils::tar` `extra_flags` argument to `NULL` (default `""`). This benefits from logic baked in (also used by `R CMD BUILD`) that checks the mode of `configure` and `cleanup` files and sets them to be executable if they are not already.

### Are these changes tested?

No. I didn't see any existing tests for this function (which perhaps is not a valid reason). 

### Are there any user-facing changes?

No. Although if `configure` and/or `cleanup` are not executable, that will be corrected with a user-facing `warning`.

* GitHub Issue: #40227

edit: revised the description based on the new approach in 40e8add.

Authored-by: Paul Donnelly <[email protected]>
Signed-off-by: Nic Crane <[email protected]>
  • Loading branch information
hutch3232 authored Mar 6, 2024
1 parent ee1a8c3 commit 96f26a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion r/R/install-arrow.R
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ create_package_with_all_dependencies <- function(dest_file = NULL, source_file =
setwd(untar_dir)

message("Repacking tar.gz file to ", dest_file)
tar_successful <- utils::tar(dest_file, compression = "gz") == 0
tar_successful <- utils::tar(dest_file, compression = "gz", extra_flags = NULL) == 0
if (!tar_successful) {
stop("Failed to create new tar.gz file")
}
Expand Down

0 comments on commit 96f26a8

Please sign in to comment.