Carlos J. Gil Bellosta
2006-Jul-19 23:24 UTC
[R] Automating package building packages and repository uploading
Dear Rusers, I have developed two packages for a client of mine. After new features are added or bugs corrected, I upload them to my own web repository. I create both source and binary versions. In fact, I made an script that checks, builds, and uploads them via ftp. However, I am facing two nuisances that do make it difficult to automate: 1) Even if I build the binary version with the command R CMD build --use-zip --binary $package within my script, the output package still gets tarballed and gzipped instead than simply zipped. I come around this automatically extracting and compressing back the files but, am I missing something some other option that would make all this simpler? 2) I expect my packages to be named something like mypackage_1.3.12.tar.gz or mypackage_1.3.12.zip. However, "sometimes" --I haven't looked at the code that decides the name to give to the packages, so it looks quite "random" to me-- they get renamed into something like mypackage_1.3.12_R_i486-pc-linux-gnu.tar.gz or mypackage_1.3.12_R_i486-pc-linux-gnu.zip. The problem is that, then, the update.packages() function cannot find them. Is there a way to prevent this trailing string from appearing in the file name? Or else, is there a way to have update.packages() find the package regardless of it? I am running platform i486-pc-linux-gnu arch i486 os linux-gnu system i486, linux-gnu status major 2 minor 3.1 year 2006 month 06 day 01 svn rev 38247 language R version.string Version 2.3.1 (2006-06-01) on Debian Etch with kernel 2.6.15-1-k7. Thank you very much. Carlos J. Gil Bellosta http://www.datanalytics.com http://www.data-mining-blog.com
Prof Brian Ripley
2006-Jul-20 06:12 UTC
[R] Automating package building packages and repository uploading
On Thu, 20 Jul 2006, Carlos J. Gil Bellosta wrote:> Dear Rusers, > > I have developed two packages for a client of mine. After new features > are added or bugs corrected, I upload them to my own web repository. I > create both source and binary versions.binary Linux packages, it seems. The latter are .tar.gz with the arch as part of the name. .zip is used for Windows packages only. update.packages for Linux is designed to look for source packages only: see the 'type' argument. You can use the distro's packaging facilities for binary packages, and Dirk does for the Debian R distribution. I think those misconceptions explain your confusion.> In fact, I made an script that checks, builds, and uploads them via ftp. > However, I am facing two nuisances that do make it difficult to > automate: > > 1) Even if I build the binary version with the command > > R CMD build --use-zip --binary $package > > within my script, the output package still gets tarballed and gzipped > instead than simply zipped. I come around this automatically extracting > and compressing back the files but, am I missing something some other > option that would make all this simpler? > > 2) I expect my packages to be named something like > mypackage_1.3.12.tar.gz or mypackage_1.3.12.zip. However, "sometimes" > --I haven't looked at the code that decides the name to give to the > packages, so it looks quite "random" to me-- they get renamed into > something like mypackage_1.3.12_R_i486-pc-linux-gnu.tar.gz or > mypackage_1.3.12_R_i486-pc-linux-gnu.zip. The problem is that, then, the > update.packages() function cannot find them. Is there a way to prevent > this trailing string from appearing in the file name? Or else, is there > a way to have update.packages() find the package regardless of it? > > I am running > > platform i486-pc-linux-gnu > arch i486 > os linux-gnu > system i486, linux-gnu > status > major 2 > minor 3.1 > year 2006 > month 06 > day 01 > svn rev 38247 > language R > version.string Version 2.3.1 (2006-06-01) > > on Debian Etch with kernel 2.6.15-1-k7. > > Thank you very much. > > Carlos J. Gil Bellosta > http://www.datanalytics.com > http://www.data-mining-blog.com-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595