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
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)
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
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)