account for platform when checking for existing entries
This commit is contained in:
parent
5d6ea71eb5
commit
ff9e19b8c6
3 changed files with 7 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#' @export
|
||||
install_package_system_dependencies <- function(package_name,
|
||||
tag,
|
||||
platform = "redhat-9",
|
||||
platform = platform,
|
||||
local_clone_dir) {
|
||||
cli::cli_alert("{.fun install_package_system_dependencies}: Cloning package {.pkg {package_name[1]}} with tag {.field {tail(tag, 1)}}.")
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ store_build_metadata <- function(
|
|||
# Check if an entry with the same package_name and tag already exists
|
||||
existing_entries <- dbGetQuery(con, paste0(
|
||||
"SELECT * FROM single_builds WHERE package_name = '",
|
||||
package_name, "' AND tag = '", tag, "'"
|
||||
package_name, "' AND tag = '", tag, "' AND platform = '", platform, "'"
|
||||
))
|
||||
|
||||
if (nrow(existing_entries) >= 1 && !force) {
|
||||
|
|
@ -19,8 +19,8 @@ store_build_metadata <- function(
|
|||
} else if (nrow(existing_entries) >= 1 && force) {
|
||||
cli::cli_alert_info("{.fun store_build_metadata}: Force overwriting build metadata for {.pkg {package_name}} {.field {tag}} because {.code force = TRUE} was set.")
|
||||
|
||||
DBI::dbExecute(con, "UPDATE single_builds SET build_timestamp = $1, error_occurred = $2, error = $3 WHERE package_name = $4 and tag = $5",
|
||||
params = list(format(Sys.time(), "%Y-%m-%d %H:%M:%S"), error_occurred, error, package_name, tag)
|
||||
DBI::dbExecute(con, "UPDATE single_builds SET build_timestamp = $1, error_occurred = $2, error = $3, platform = $4 WHERE package_name = $5 and tag = $6",
|
||||
params = list(format(Sys.time(), "%Y-%m-%d %H:%M:%S"), error_occurred, error, platform, package_name, tag)
|
||||
)
|
||||
} else if (nrow(existing_entries) == 0) {
|
||||
cli::cli_alert("{.fun store_build_metadata}: Storing build metadata for {.pkg {package_name}} {.field {tag}}.")
|
||||
|
|
@ -97,4 +97,4 @@ build_metadata_summary <- function(package_name, platform) {
|
|||
|
||||
# Close the SQLite connection
|
||||
dbDisconnect(con)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ build_binary_package(
|
|||
codename = NULL,
|
||||
r_minor_version = NULL,
|
||||
build_for_minor = TRUE,
|
||||
local_build_root = "/mnt/cache/binaries/",
|
||||
local_build_root = "/root",
|
||||
local_clone_dir = "/tmp",
|
||||
platform = "redhat-9",
|
||||
platform = NULL,
|
||||
install_system_dependencies = TRUE,
|
||||
debug = FALSE,
|
||||
force = FALSE
|
||||
|
|
|
|||
Loading…
Reference in a new issue