From 018ae105b59cae8111c1f80667ad98b551dc07c1 Mon Sep 17 00:00:00 2001 From: blundellc Date: Sat, 13 Sep 2008 13:21:18 +0000 Subject: [PATCH] bulk build modifications: regexp tweaks, license/sysreq override additions, drop bioc for now. bioconductor packages appear to be much worse at using undeclared systemrequirements (or maybe have a different base set they assume) so drop for now. current success rate is around 90% to 96%. most failures still due to poorly formed License: fields (!) followed by undeclared system requirements. git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@82 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- pkg/trunk/R/db.R | 4 ++-- pkg/trunk/R/debcontrol.R | 1 + pkg/trunk/data/populate_licenses | 4 ++++ pkg/trunk/data/populate_sysreq | 15 +++++++++++---- pkg/trunk/exec/build | 15 ++++++++------- pkg/trunk/exec/build_some | 15 +++++++++++---- pkg/trunk/exec/diagnose | 5 +++-- pkg/trunk/exec/update_cache | 2 +- 8 files changed, 41 insertions(+), 20 deletions(-) diff --git a/pkg/trunk/R/db.R b/pkg/trunk/R/db.R index 81b7b59..db35927 100644 --- a/pkg/trunk/R/db.R +++ b/pkg/trunk/R/db.R @@ -29,7 +29,7 @@ db_stop <- function(con) { } db_quote <- function(text) { - return(paste('"',gsub('([^][[:alnum:]*?. ()<>:/=+-])','\\\\\\1',text),'"',sep='')) + return(paste('"',gsub('([^][[:alnum:]*?. ()<>:/=+%-])','\\\\\\1',text),'"',sep='')) } db_sysreq_override <- function(sysreq_text) { @@ -37,7 +37,7 @@ db_sysreq_override <- function(sysreq_text) { con <- db_start() results <- dbGetQuery(con,paste( 'SELECT DISTINCT debian_name FROM sysreq_override WHERE' - ,db_quote(sysreq_text),'GLOB r_pattern')) + ,db_quote(sysreq_text),'LIKE r_pattern')) db_stop(con) if (length(results) == 0) { return(NA) diff --git a/pkg/trunk/R/debcontrol.R b/pkg/trunk/R/debcontrol.R index f6c14f9..50bf742 100644 --- a/pkg/trunk/R/debcontrol.R +++ b/pkg/trunk/R/debcontrol.R @@ -50,6 +50,7 @@ sysreqs_as_debian <- function(sysreq_text) { # form of this field is unspecified (ugh) but most people seem to stick # with this debs <- c() + sysreq_text <- gsub('[[:space:]]and[[:space:]]',' , ',tolower(sysreq_text)) for (sysreq in strsplit(sysreq_text,'[[:space:]]*,[[:space:]]*')[[1]]) { startreq = sysreq # constant case diff --git a/pkg/trunk/data/populate_licenses b/pkg/trunk/data/populate_licenses index 8a941fc..37735a5 100644 --- a/pkg/trunk/data/populate_licenses +++ b/pkg/trunk/data/populate_licenses @@ -38,10 +38,13 @@ pkg distrib-noncomm PTAk pkg distrib-noncomm siggenes pkg GPL+ACM akima pkg GPL+ACM tripack +pkg GPL degreenet pkg GPL ergm pkg GPL gmodels pkg GPL ICE +pkg GPL latentnet pkg GPL network +pkg GPL networksis pkg GPL pastecs pkg GPL pbatR pkg GPL PKtools @@ -50,6 +53,7 @@ pkg GPL reldist pkg GPL RXshrink pkg GPL snpMatrix pkg GPL splancs +pkg GPL statnet pkg GPL uroot pkg LGPL R.huge pkg MCLUST mclust diff --git a/pkg/trunk/data/populate_sysreq b/pkg/trunk/data/populate_sysreq index 180b08d..f39478a 100644 --- a/pkg/trunk/data/populate_sysreq +++ b/pkg/trunk/data/populate_sysreq @@ -1,5 +1,7 @@ add build-essential gcc add build-essential gnu make +add build-essential none +add build-essential % if present add libquantlib0-dev quantlib% add pari-gp pari/gp add libcairo2-dev cairo @@ -16,10 +18,15 @@ add libpng12-dev libpng add libfreetype6-dev freetype add libgsl0-dev gnu scientific library add libgmp3-dev gmp -add libgdal1-dev gdal -add proj proj.4 +add libgdal1-dev %gdal% +add proj proj% add libgraphviz-dev graphviz -add imagemagick imagemagick -add curl curl +add libmagick9-dev imagemagick +add curl libcurl4-openssl-dev add libxml2-dev libxml% add libfreetype6-dev %freetype +add ggobi ggobi +add libjpeg62-dev libjpeg% +add libdieharder-dev dieheader% +add msttcorefonts msttcorefonts +add libfontconfig1-dev fontconfig diff --git a/pkg/trunk/exec/build b/pkg/trunk/exec/build index d3d40a4..92e1e40 100755 --- a/pkg/trunk/exec/build +++ b/pkg/trunk/exec/build @@ -6,20 +6,21 @@ go <- function(name,extra_deps) { pkg <- try((function() { # see if it has already been built srcname <- pkgname_as_debian(name,binary=F) + debname <- pkgname_as_debian(name,binary=T) version <- version_new(available[name,'Version']) if (file.exists(changesfile(srcname, version))) { message(paste('N: already built',srcname,'version',version)) - return(pkg) + return(NA) } - rm(srcname,version) - - pkg <- prepare_new_debian(prepare_pkg(dir,name),extra_deps) # XXX: what about building newer versions? - if (pkg$debname %in% debian_pkgs) { - message(paste('N:',pkg$srcname,' exists in Debian (perhaps a different version)')) - return(pkg) + if (debname %in% debian_pkgs) { + message(paste('N:',srcname,' exists in Debian (perhaps a different version)')) + return(NA) } + rm(debname,srcname,version) + + pkg <- prepare_new_debian(prepare_pkg(dir,name),extra_deps) # delete the current archive (XXX: assumes mini-dinstall) for (subdir in c('mini-dinstall','unstable')) { path = file.path(dinstall_archive,subdir) diff --git a/pkg/trunk/exec/build_some b/pkg/trunk/exec/build_some index 6adee62..5f56c43 100755 --- a/pkg/trunk/exec/build_some +++ b/pkg/trunk/exec/build_some @@ -8,16 +8,23 @@ if ([ ! -e all_pkgs ]) { for (pkg in `{cat all_pkgs}) { if (~ $pkg *..* */*) { echo bad name $pkg >>fail/ERROR + } else if ([ -e warn/$pkg ]) { + echo skipping $pkg... + } else if ([ -e fail/$pkg ]) { + echo skipping failed $pkg... } else { - echo .. package $pkg + echo -n .. package $pkg fail=0 cran2deb build $pkg >fail/$pkg >[2=1] || fail=1 if (~ $fail 0) { + echo success grep '^[WE]:' fail/$pkg >warn/$pkg - if (~ `{stat -c '%s' warn/$pkg} 0) { - rm -f warn/$pkg - } +# if (~ `{stat -c '%s' warn/$pkg} 0) { +# rm -f warn/$pkg +# } rm -f fail/$pkg + } else { + echo FAILED } } } diff --git a/pkg/trunk/exec/diagnose b/pkg/trunk/exec/diagnose index 091da01..3740b50 100755 --- a/pkg/trunk/exec/diagnose +++ b/pkg/trunk/exec/diagnose @@ -64,8 +64,9 @@ echo $nfailother other failures. total=`{hoc -e $total} succrate=`{hoc -e $success/'('$total')*100'} echo $succrate% success rate '('$total' total)' -total=`{hoc -e $total-$nfaillic-$nfailspc-$nfailhdr} +#total=`{hoc -e $total-$nfaillic-$nfailspc-$nfailhdr} +total=`{hoc -e $total-$nfaillic-$nfailspc} succrate=`{hoc -e $success/'('$total')*100'} -echo $succrate% success rate without licensing, space and Debian deps issues '('$total' total)' +echo $succrate% success rate with exclusions '('$total' total)' grep -EL $other fail/* /dev/null | xargs tail -n 20 diff --git a/pkg/trunk/exec/update_cache b/pkg/trunk/exec/update_cache index 60c63c0..b7e7429 100755 --- a/pkg/trunk/exec/update_cache +++ b/pkg/trunk/exec/update_cache @@ -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) -- 2.39.5