]> git.donarmstrong.com Git - cran2deb.git/commitdiff
exec: drop bioc, more verbose version mismatch error, switch hoc to awk (more portable)
authorblundellc <blundellc@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sat, 13 Sep 2008 13:23:06 +0000 (13:23 +0000)
committerblundellc <blundellc@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sat, 13 Sep 2008 13:23:06 +0000 (13:23 +0000)
some packages are in bioc and cran (e.g., graph). this confused cran2deb
as One True Package is expected. to solve this, we could filter for
common tables and take the highest version number. but who's to say
these aren't actually distinct packages? so for now, assume all cran
dependencies are satisfiable in cran (they aren't).

git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@96 edb9625f-4e0d-4859-8d74-9fd3b1da38cb

pkg/trunk/R/debianpkg.R
pkg/trunk/exec/update
pkg/trunk/exec/update_cache

index 171aa4d2af3116ee7174867eaeaa3b32e99e0497..956e187e663703169fca3377c184e326eaaaa137 100644 (file)
@@ -57,6 +57,8 @@ prepare_new_debian <- function(pkg,extra_deps) {
     if (pkg$version != available[pkg$name,'Version']) {
         # should never happen since available is the basis upon which the
         # package is retrieved.
+        error('available version:',available[pkg$name,'Version'])
+        error('package version:',pkg$version)
         fail('inconsistency between R package version and cached R version')
     }
     pkg$debversion = new_build_version(pkg$name)
index d4548370dfcc9b24560417cddc4c08fab3354e9d..fb4c01f2d444454452225ffdf770340e547f03e4 100755 (executable)
@@ -12,11 +12,13 @@ if ([ ! -e $root/var/archive ]) {
     mkdir $root/var/archive || exit 1
 }
 mini-dinstall --batch -c $root/etc/mini-dinstall.conf || exit 1
-delta=`{hoc -e `{date +%s}^-^`{stat -c '%Y' /var/cache/cran2deb/cache.rda}}
 update_period=10800
-echo Cache is $delta seconds out of date.
-if (~ $1 full) {
-    delta=`{hoc -e $update_period^'+1'}
+if (~ $1 full || ![ -e /var/cache/cran2deb/cache.rda ] ) {
+    delta=`{awk 'END{print '^$update_period^'+1}' </dev/null}
+    echo Forcing cache update
+} else {
+    delta=`{awk 'END{print '^`{date +%s}^-^`{stat -c '%Y' /var/cache/cran2deb/cache.rda}^'}' </dev/null}
+    echo Cache is $delta seconds out of date.
 }
 if (![ -e /var/cache/cran2deb/cache.rda ] || [ $delta -gt $update_period ]) {
     mode=create
index 60c63c0530870902e1fc892005ae4b7dbb9d330f..b7e7429da19579f43bbbb43753528ab6908b39a5 100755 (executable)
@@ -10,7 +10,7 @@ mirror <- 'http://cran.r-project.org/'
 
 message('updating list of available R packages...')
 available <- available.packages(contrib.url(mirror))
-available <- rbind(available,available.packages(contrib.url('http://www.bioconductor.org/')))
+#available <- rbind(available,available.packages(contrib.url('http://www.bioconductor.org/')))
 
 message('updating list of available R task views...')
 ctv.available <- available.views(repo=mirror)