Re: [R] Automating package building packages and repository uploading

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu 20 Jul 2006 - 21:30:13 EST

On Thu, 20 Jul 2006, Carlos J. Gil Bellosta wrote:

> Dear Rusers,
>
> Well, then it seems that the problem is that I am building "linux binary
> packages". Since I do not have any compiled code within --just R code--, their
> contents should --and, in fact, are-- directly installable on Windows
> platforms
> (which is what I intend to do).
>
> If I understand things right, I could just rebundle the packages using zip
> instead of tar | gzip and getting rid of the "arch" string in the file name.
> They they would work on Windows. And they actually do when I do this by hand.
>
> But, is there a less involved way to generate these binary Windows
> packages with proper file names and compression method directly from my
> linux box?

`involved'? Not anything like as involved as working out what it is you are trying to do from your description which made no mention anywhere of Windows!

You can cross-compile the packages on your Linux box if you prefer, which will give you zips with the right file names.

Either way, you will be missing Compiled HTML help, which is likely to be the default form on Windows help in the next release of R.

>
> Thank you very much,
>
> Carlos J. Gil Bellosta
> http://www.datanalytics.com
> http://www.data-mining-blog.com
>
> Quoting Prof Brian Ripley <ripley@stats.ox.ac.uk>:
>
> > 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@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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu Jul 20 21:33:26 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 20 Jul 2006 - 22:17:50 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.