From 277926cddbe48af9b34c818402266954e9cbf19f Mon Sep 17 00:00:00 2001 From: blundellc Date: Sat, 13 Sep 2008 13:25:29 +0000 Subject: [PATCH] build: always force the build of packages mentioned on the command line. git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@115 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- pkg/trunk/R/build.R | 5 +++++ pkg/trunk/exec/build | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/trunk/R/build.R b/pkg/trunk/R/build.R index 6f206a2..316258b 100644 --- a/pkg/trunk/R/build.R +++ b/pkg/trunk/R/build.R @@ -6,11 +6,14 @@ build <- function(name,extra_deps,force=F) { } log_clear() dir <- setup() + + # obtain the Debian version-to-be version <- try(new_build_version(name)) if (inherits(version,'try-error')) { error('failed to build',name) return(NULL) } + result <- try((function() { if (!force && !needs_build(name,version)) { notice('skipping build of',name) @@ -71,6 +74,7 @@ build <- function(name,extra_deps,force=F) { # nothing was done so escape asap. return(result) } + # otherwise record progress failed = inherits(result,'try-error') if (failed) { @@ -103,6 +107,7 @@ needs_build <- function(name,version) { notice('already built',srcname,'version',version) return(F) } + # XXX: what about building newer versions of Debian packages? if (debname %in% debian_pkgs) { notice(srcname,' exists in Debian (perhaps a different version)') diff --git a/pkg/trunk/exec/build b/pkg/trunk/exec/build index aa8a175..b875e60 100755 --- a/pkg/trunk/exec/build +++ b/pkg/trunk/exec/build @@ -38,6 +38,6 @@ if (exists('argv')) { # check for littler build_order <- r_dependency_closure(c(extra_deps$r,argv)) notice('build order',paste(build_order,collapse=', ')) for (pkg in build_order) { - build(pkg,extra_deps) + build(pkg,extra_deps,force=pkg %in% argv) } } -- 2.39.5