From: blundellc <blundellc@edb9625f-4e0d-4859-8d74-9fd3b1da38cb> Date: Sat, 13 Sep 2008 14:03:29 +0000 (+0000) Subject: change git_revision to scm_revision; use svn $Id$. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7c74d4e371b7ecda2035aa106918b0427818cacf;p=cran2deb.git change git_revision to scm_revision; use svn $Id$. git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@148 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- diff --git a/trunk/R/db.R b/trunk/R/db.R index f6a4c07..5c9836d 100644 --- a/trunk/R/db.R +++ b/trunk/R/db.R @@ -59,7 +59,7 @@ db_start <- function() { ,',deb_revision INTEGER NOT NULL' ,',db_version INTEGER NOT NULL' ,',date_stamp TEXT NOT NULL' - ,',git_revision TEXT NOT NULL' + ,',git_revision TEXT NOT NULL' # legacy: really scm_revision ,',success INTEGER NOT NULL' ,',log TEXT' ,',UNIQUE(package,r_version,deb_epoch,deb_revision,db_version)' @@ -295,7 +295,7 @@ db_record_build <- function(package, deb_version, log, success=F) { ,',',db_cur_version(con) ,',',as.integer(success) ,',',db_quote(format(Sys.time(),'%a, %d %b %Y %H:%M:%S %z')) - ,',',db_quote(git_revision) + ,',',db_quote(scm_revision) ,',',db_quote(paste(log, collapse='\n')) ,')')) db_stop(con) diff --git a/trunk/R/debianpkg.R b/trunk/R/debianpkg.R index 416a911..8d9bb65 100644 --- a/trunk/R/debianpkg.R +++ b/trunk/R/debianpkg.R @@ -6,7 +6,7 @@ append_build_from_pkg <- function(pkg, builds) { ,deb_revision = version_revision(pkg$debversion) ,db_version = db_get_version() ,date_stamp = pkg$date_stamp - ,git_revision = git_revision + ,git_revision = scm_revision ,success = 1 # never used ,log = '' # never used ) diff --git a/trunk/R/zzz.R b/trunk/R/zzz.R new file mode 100644 index 0000000..a576837 --- /dev/null +++ b/trunk/R/zzz.R @@ -0,0 +1,23 @@ +.First.lib <- function(libname, pkgname) { + global <- function(name,value) assign(name,value,envir=.GlobalEnv) + global("maintainer", 'cran2deb autobuild <cran2deb@example.org>') + global("root", system.file(package='cran2deb')) + global("cache_root", '/var/cache/cran2deb') + global("pbuilder_results", '/var/cache/cran2deb/results') + global("pbuilder_config", '/etc/cran2deb/pbuilderrc') + global("dput_config", '/etc/cran2deb/dput.cf') + global("dinstall_config", '/etc/cran2deb/mini-dinstall.conf') + global("dinstall_archive", '/etc/cran2deb/archive') + global("r_depend_fields", c('Depends','Imports')) # Suggests, Enhances + global("scm_revision", 'svn:$Id$') + global("changesfile", function(srcname,version='*') { + return(file.path(pbuilder_results + ,paste(srcname,'_',version,'_' + ,host_arch(),'.changes',sep=''))) + }) + + cache <- file.path(cache_root,'cache.rda') + if (file.exists(cache)) { + load(cache,envir=.GlobalEnv) + } +} diff --git a/trunk/R/zzz.R.in b/trunk/R/zzz.R.in deleted file mode 100644 index e486f50..0000000 --- a/trunk/R/zzz.R.in +++ /dev/null @@ -1,24 +0,0 @@ -.First.lib <- function(libname, pkgname) { - global <- function(name,value) assign(name,value,envir=.GlobalEnv) - global("maintainer", 'cran2deb autobuild <cran2deb@example.org>') - global("root", system.file(package='cran2deb')) - global("cache_root", '/var/cache/cran2deb') - global("pbuilder_results", '/var/cache/cran2deb/results') - global("pbuilder_config", '/etc/cran2deb/pbuilderrc') - global("dput_config", '/etc/cran2deb/dput.cf') - global("dinstall_config", '/etc/cran2deb/mini-dinstall.conf') - global("dinstall_archive", '/etc/cran2deb/archive') - global("r_depend_fields", c('Depends','Imports')) # Suggests, Enhances - # git_revision { - # git_revision } - global("changesfile", function(srcname,version='*') { - return(file.path(pbuilder_results - ,paste(srcname,'_',version,'_' - ,host_arch(),'.changes',sep=''))) - }) - - cache <- file.path(cache_root,'cache.rda') - if (file.exists(cache)) { - load(cache,envir=.GlobalEnv) - } -} diff --git a/trunk/configure b/trunk/configure deleted file mode 100755 index 106c58a..0000000 --- a/trunk/configure +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# stamp the source with the originating git revision. -git_rev=$(git show --pretty'=oneline' 'HEAD' | head -n1 | cut -f1 -d' ') -#git_r='assign("git_revision","'$git_rev'",envir=.GlobalEnv)' -git_r=' global("git_revision","'$git_rev'")' - -awk -v "git_r=$git_r" ' -/# git_revision }/ {suppress=0} -suppress == 0 {print} -/# git_revision {/ {print git_r; suppress=1} -' <R/zzz.R.in >R/zzz.R