I don't know why there is no 'ask' argument for BiocInstaller:::.biocUpgrade() (perhaps somebody from Seattle will comment). But note that you can always get BiocInstaller from svn (or the tarball), and then change BiocInstaller:::.biocUpgrade() to have an 'ask' argument (in useDevel.R, it currently has no arguments):
Existing:
.biocUpgrade <-
function()
{
if (!IS_UPGRADEABLE) {
.stop("Bioconductor version %s cannot be upgraded with
R version %s", biocVersion(), R_VERSION)
}
if (IS_UPGRADEABLE && UPGRADE_IS_DEVEL)
.stop("Bioconductor version %s can be upgraded, but only to 'devel';
see ?useDevel. Use biocLite() without any arguments to update
installed packages", biocVersion())
txt <- sprintf("Upgrade all packages to Bioconductor version %s? [y/n]: ",
UPGRADE_VERSION)
answer <- .getAnswer(txt, allowed = c("y", "Y", "n", "N"))
if ("y" == answer)
.update(UPGRADE_VERSION, TRUE)
}
Updated:
.biocUpgrade <-
function(ask = TRUE)
{
if (!IS_UPGRADEABLE) {
.stop("Bioconductor version %s cannot be upgraded with
R version %s", biocVersion(), R_VERSION)
}
if (IS_UPGRADEABLE && UPGRADE_IS_DEVEL)
.stop("Bioconductor version %s can be upgraded, but only to 'devel';
see ?useDevel. Use biocLite() without any arguments to update
installed packages", biocVersion())
if(ask){
txt <- sprintf("Upgrade all packages to Bioconductor version %s? [y/n]: ",
UPGRADE_VERSION)
answer <- .getAnswer(txt, allowed = c("y", "Y", "n", "N"))
if ("y" == answer)
.update(UPGRADE_VERSION, TRUE)
} else {
.update(UPGRADE_VERSION, TRUE)
}
}
You will also have to change biocLite:
From
biocLite <-
function(pkgs=c("Biobase","IRanges","AnnotationDbi"),
suppressUpdates=FALSE,
suppressAutoUpdate=FALSE,
siteRepos=character(), ask=TRUE, ...)
{
if (missing(pkgs)) # biocLite() update w/out installing defaults
pkgs <- pkgs[!pkgs %in% rownames(installed.packages())]
if (!suppressAutoUpdate && !bioconductorPackageIsCurrent()) {
on.exit(updateBioconductorPackage(pkgs, ask=ask,
suppressUpdates=suppressUpdates,
siteRepos=siteRepos, ...))
} else if ("BiocUpgrade" %in% pkgs) {
.biocUpgrade()
} else {
biocLiteInstall(pkgs, ask=ask, siteRepos=siteRepos,
suppressUpdates=suppressUpdates, ...)
}
}
To:
biocLite <-
function(pkgs=c("Biobase","IRanges","AnnotationDbi"),
suppressUpdates=FALSE,
suppressAutoUpdate=FALSE,
siteRepos=character(), ask=TRUE, ...)
{
if (missing(pkgs)) # biocLite() update w/out installing defaults
pkgs <- pkgs[!pkgs %in% rownames(installed.packages())]
if (!suppressAutoUpdate && !bioconductorPackageIsCurrent()) {
on.exit(updateBioconductorPackage(pkgs, ask=ask,
suppressUpdates=suppressUpdates,
siteRepos=siteRepos, ...))
} else if ("BiocUpgrade" %in% pkgs) {
.biocUpgrade(ask = ask)
} else {
biocLiteInstall(pkgs, ask=ask, siteRepos=siteRepos,
suppressUpdates=suppressUpdates, ...)
}
}
Then build and install.