Skip to contents

Main Workflow Functions

High-level functions for the main binary building workflow

process_cran_updates()
Process updated and new CRAN packages
build_binary_package()
Build R binary packages

CRAN Package Discovery

Functions to discover package changes from CRAN

get_new_cran_packages()
Get new CRAN packages
get_updated_cran_packages()
Get updated CRAN packages
get_removed_cran_packages()
Get removed CRAN packages
get_r_minor_sensitive_packages()
Returns R minor sensitive R packages

Archive Management

Functions for archiving old package versions

archive_package()
Archive packages in CRAN-like repositories
process_unarchived_pkgs()
Returns packages that need to be archived (have multiple versions)
write_archive_rds()
Create Meta/archive.rds for {remotes} package

Upload & Storage

Functions for uploading packages and managing S3 storage

upload_single_binary()
Upload binary to S3
upload_source_tarball()
Uploads source tarballs to S3
upload_package_index()
Upload package index files to S3

Repository Index Management

Functions for creating and managing CRAN-like repository indices

add_to_package_index()
Add package to repository index

Metadata & Database

Functions for managing build metadata and database operations

list_metadata_tables()
List existing database tables
query_metadata_table()
Query a specific table in the Postgres database containing the metadata
query_packages_without_historic_versions()
Returns packages that do not have any historic versions stored in S3
get_missing_pkgs_db()
Returns all packages names of CRAN packages not present in the linked database

Utilities & Helpers

Utility functions for configuration and checks

check_for_binary()
Checks whether a binary for the latest package version exists
set_bin_path()
Set path for binary package outputs
set_codename()
Set codename for Linux distribution
init_repo()
Initialize a new R repository
build_single_tag()
Build binary for a single tag
install_pkg_sys_deps()
Install system dependencies for an R package

Internal Helper Functions

Internal helper functions used by the main workflow (typically not called directly)

acquire_pak_mutex()
Acquire cache-aware mutex for pak operations
archive_single_package()
Archive a single package
check_build_skip_conditions()
Check if build should be skipped
check_package_error()
Check if a package has previous build errors
check_root_package_exists()
Check if root package exists in S3
check_s3_packages()
Check S3 for existing packages
check_s3_root_package()
Check if root package exists in S3 for check_s3_packages
classify_error_for_retry()
Classify error types for retry decisions
clean_duplicated_packages()
Clean duplicated package files
cleanup_stale_locks()
Clean up stale pak cache lock files
clone_package_repo()
Clone package repository
clone_repository()
Clone package repository
determine_packages_to_build()
Determine which packages need to be built
execute_package_build()
Execute the actual package build
execute_package_builds()
Execute package builds with parallel processing
filter_packages_with_errors()
Filter packages with previous build errors
filter_tags()
Filter git tags for package versions
find_old_versions()
Find old package versions to archive
get_all_s3_packages()
Get all packages from S3 for comparison
get_archive_path()
Get archive destination path
get_minor_version()
Get R minor version string
get_remote_search_path()
Archive helper functions for package archiving operations Get remote search path for package archives
get_system_architecture_info()
Get system architecture information
handle_build_output_files()
Handle build output files and cleanup
handle_post_build_actions()
Handle post-build actions
handle_system_dependencies()
Handle system dependency installation
initialize_build_environment()
Initialize build environment and setup paths
list_archived_packages()
List archived packages from S3
move_and_rename_tarball()
Move and rename built tarball files
parse_package_tag_pairs()
Build helper functions for package building operations Parse package tag pairs from difference strings
perform_aggressive_cleanup()
Perform aggressive cache cleanup
process_tag_filtering()
Process tag filtering for check_s3_packages
release_pak_mutex()
Release process-level mutex for pak operations
remove_from_metadata()
Remove package from metadata table
retry_with_backoff()
Retry a function with exponential backoff
run_pak_install_with_mutex()
Run pak installation with mutex protection
setup_installation_env_vars()
Setup environment variables for package installation
store_build_metadata()
Store build metadata of single binary builds