Skip to content

Commit cb8aeff

Browse files
committed
.dev-only: revdep faster startup as one part was too deep in a loop, and no need to update.packages() a 2nd time
1 parent 20333c1 commit cb8aeff

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.dev/revdep.R

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ for (p in deps) {
155155
}
156156
}
157157
cat("New downloaded:",new," Already had latest:", old, " TOTAL:", length(deps), "\n")
158-
update.packages(checkBuilt=TRUE, ask=FALSE) # won't rebuild packages which are no longer available on CRAN
159158

160159
# Remove the tar.gz no longer needed :
161160
for (p in deps) {
@@ -166,12 +165,12 @@ for (p in deps) {
166165
cat("Removing",i,"because",f,"is newer\n")
167166
system(paste0("rm ",i))
168167
}
169-
all = system("ls *.tar.gz", intern=TRUE)
170-
all = sapply(strsplit(all, split="_"),'[',1)
171-
for (i in all[!all %in% deps]) {
172-
cat("Removing",i,"because it", if (!i %in% rownames(avail)) "has been removed from CRAN\n" else "no longer uses data.table\n")
173-
system(paste0("rm ",i,"_*.tar.gz"))
174-
}
168+
}
169+
all = system("ls *.tar.gz", intern=TRUE)
170+
all = sapply(strsplit(all, split="_"),'[',1)
171+
for (i in all[!all %in% deps]) {
172+
cat("Removing",i,"because it", if (!i %in% rownames(avail)) "has been removed from CRAN\n" else "no longer uses data.table\n")
173+
system(paste0("rm ",i,"_*.tar.gz"))
175174
}
176175
num_tar.gz = as.integer(system("ls *.tar.gz | wc -l", intern=TRUE))
177176
if (length(deps) != num_tar.gz) stop("num_tar.gz==",num_tar.gz," but length(deps)==",length(deps))

0 commit comments

Comments
 (0)