Check if root package exists in S3 for check_s3_packages
check_s3_root_package.RdHelper function to check if the latest package version exists in S3, accounting for R minor version sensitivity.
Usage
check_s3_root_package(
remote_bin_path,
package_name,
last_version,
is_r_minor_sensitive,
s3_access_key_id,
s3_secret_access_key,
s3_endpoint,
s3_region
)Arguments
- remote_bin_path
(character)
Path to remote binary directory- package_name
(character)
Package name- last_version
(character)
Latest version string from CRAN- is_r_minor_sensitive
(logical)
If TRUE, treats the package to be minor version specific and injects a version identifier into the file path.- s3_access_key_id
(character)
S3 access key ID- s3_secret_access_key
(character)
S3 secret access key- s3_endpoint
(character)
S3 endpoint- s3_region
(character)
S3 region
Details
This is what decides whether a build runs at all, so it has to mean "a binary
is published", not "something occupies that key". A package whose build
failed has its CRAN source published under exactly that name by
handle_post_build_actions(), and an existence-only test reports it as done:
the rebuild then skips every such package with "All packages to be built
already exist in the remote bucket", which is precisely the set a rebuild
exists to fix.
An object whose MD5 matches CRAN's published MD5sum is therefore reported
as absent. When the MD5 cannot be established – a multipart ETag, or CRAN
unreachable – the object counts as a binary, so neither can make every
package look missing and trigger a full rebuild.