From eb3e6dfc1531bc284a586fad68d81edfa85b2804 Mon Sep 17 00:00:00 2001 From: Kevin Ushey Date: Fri, 13 Dec 2024 11:54:25 -0800 Subject: [PATCH] tweaks --- R/hash.R | 6 +++--- R/snapshot.R | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/R/hash.R b/R/hash.R index e008b27af..04bc616b3 100644 --- a/R/hash.R +++ b/R/hash.R @@ -10,10 +10,10 @@ renv_hash_fields <- function(dcf) { ) } -renv_hash_fields_default <- function(dcf) { +renv_hash_fields_default <- function() { c( - "Package", "Version", - "Title", "Author", "Maintainer", "Description", + "Package", "Version", "Title", + "Author", "Maintainer", "Description", "Depends", "Imports", "Suggests", "LinkingTo" ) } diff --git a/R/snapshot.R b/R/snapshot.R index de37ee796..28b1851da 100644 --- a/R/snapshot.R +++ b/R/snapshot.R @@ -744,7 +744,7 @@ renv_snapshot_description_impl <- function(dcf, path = NULL) { # drop fields that normally only appear in binary packages, # or fields which might differ from user to user, or might # differ depending on the mirror used for publication - ignore <- c("Packaged", "Date/Publication", "Built") + ignore <- c("Archs", "Built", "Date/Publication", "File", "MD5sum", "Packaged") dcf[ignore] <- NULL # drop remote fields for cranlike remotes @@ -756,6 +756,10 @@ renv_snapshot_description_impl <- function(dcf, path = NULL) { } } + # drop the old Github remote fields + github <- grepl("^Github", names(dcf), perl = TRUE) + dcf <- dcf[!github] + # generate a hash if we can dcf[["Hash"]] <- if (the$auto_snapshot_hash) { if (is.null(path))