Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Dec 18, 2024
1 parent fcfb00f commit eb3e6df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions R/hash.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
}
Expand Down
6 changes: 5 additions & 1 deletion R/snapshot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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))
Expand Down

0 comments on commit eb3e6df

Please sign in to comment.