From 692cdce9d3508ebe5668d213f915ee42c759f273 Mon Sep 17 00:00:00 2001 From: blundellc Date: Sat, 13 Sep 2008 13:19:30 +0000 Subject: [PATCH] ctv: make CRAN task view mass building work again. (take 2) git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@67 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- pkg/trunk/exec/build | 7 +++++-- pkg/trunk/exec/build_ctv | 4 ++-- pkg/trunk/exec/build_some | 5 +++-- pkg/trunk/exec/cran_pkgs | 3 ++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/pkg/trunk/exec/build b/pkg/trunk/exec/build index a73b10d..801f5d6 100755 --- a/pkg/trunk/exec/build +++ b/pkg/trunk/exec/build @@ -39,9 +39,12 @@ go <- function(name,extra_deps) { message(paste('N: using Debian package of',dep)) next } - message(paste('N: uploading',dep)) + # otherwise, convert to source package name + srcdep = pkgname.as.debian(dep,binary=F) + + message(paste('N: uploading',srcdep)) ret = system(paste('umask 022;dput','-c',shQuote(dput_config),'local' - ,changesfile(dep))) + ,changesfile(srcdep))) if (ret != 0) { stop('upload of dependency failed! maybe you did not build it first?') } diff --git a/pkg/trunk/exec/build_ctv b/pkg/trunk/exec/build_ctv index 754dd58..7f6201e 100755 --- a/pkg/trunk/exec/build_ctv +++ b/pkg/trunk/exec/build_ctv @@ -1,9 +1,9 @@ #!/usr/bin/env rc -for (ctv in `{./cranpkgs query}) { +for (ctv in `{cran2deb cran_pkgs query}) { echo task view $ctv... if (![ -e ctv/$ctv ]) { - ./build_some $ctv + cran2deb build_some $ctv mkdir -p ctv/$ctv mv warn fail ctv/$ctv } diff --git a/pkg/trunk/exec/build_some b/pkg/trunk/exec/build_some index dd12c2d..01e7764 100755 --- a/pkg/trunk/exec/build_some +++ b/pkg/trunk/exec/build_some @@ -1,14 +1,15 @@ #!/usr/bin/rc mkdir -p warn fail -./cranpkgs $* >all_pkgs +shift +cran2deb cran_pkgs $* >all_pkgs for (pkg in `{cat all_pkgs}) { if (~ $pkg *..* */*) { echo bad name $pkg >>fail/ERROR } else { echo .. package $pkg fail=0 - ./cran2deb $pkg >fail/$pkg >[2=1] || fail=1 + cran2deb build $pkg >fail/$pkg >[2=1] || fail=1 if (~ $fail 0) { grep '^[WE]:' fail/$pkg >warn/$pkg if (~ `{stat -c '%s' warn/$pkg} 0) { diff --git a/pkg/trunk/exec/cran_pkgs b/pkg/trunk/exec/cran_pkgs index ba9e727..57697a5 100755 --- a/pkg/trunk/exec/cran_pkgs +++ b/pkg/trunk/exec/cran_pkgs @@ -2,10 +2,11 @@ library(cran2deb) -if (length(argv) == 0) { +if (length(argv) == 1) { writeLines(sample(dimnames(available)[[1]],800)) #writeLines(dimnames(available)[[1]]) } else { + argv = argv[2:length(argv)] if (argv[1] == 'query') { for (ctv in ctv.available) { writeLines(ctv$name) -- 2.39.2