@@ -145,13 +145,13 @@ combine_deps <- function(cran_deps, remote_deps) {
145
145
return (cran_deps )
146
146
}
147
147
148
- # Only keep the remotes that are specified in the cran_deps
149
- remote_deps <- remote_deps [remote_deps $ package %in% cran_deps $ package , ]
148
+ # Only keep the remotes that are specified in the cran_deps or are NA
149
+ remote_deps <- remote_deps [is.na( remote_deps $ package ) | remote_deps $ package %in% cran_deps $ package , ]
150
150
151
151
# If there are remote deps remove the equivalent CRAN deps
152
152
cran_deps <- cran_deps [! (cran_deps $ package %in% remote_deps $ package ), ]
153
153
154
- rbind(cran_deps , remote_deps )
154
+ rbind(remote_deps , cran_deps )
155
155
}
156
156
157
157
# # -2 = not installed, but available on CRAN
@@ -254,7 +254,7 @@ update.package_deps <- function(object,
254
254
255
255
unavailable_on_cran <- object $ diff == UNAVAILABLE & object $ is_cran
256
256
257
- unknown_remotes <- object $ diff == UNAVAILABLE & ! object $ is_cran
257
+ unknown_remotes <- ( object $ diff == UNAVAILABLE | object $ diff == UNINSTALLED ) & ! object $ is_cran
258
258
259
259
if (any(unavailable_on_cran ) && ! quiet ) {
260
260
message(" Skipping " , sum(unavailable_on_cran ), " packages not available: " ,
@@ -296,7 +296,7 @@ update.package_deps <- function(object,
296
296
297
297
behind <- is.na(object $ installed ) | object $ diff < CURRENT
298
298
299
- if (any(object $ is_cran & behind )) {
299
+ if (any(object $ is_cran & ! unavailable_on_cran & behind )) {
300
300
install_packages(object $ package [object $ is_cran & behind ], repos = attr(object , " repos" ),
301
301
type = attr(object , " type" ), dependencies = dependencies , quiet = quiet , ... )
302
302
}
0 commit comments