[R] Automating package building packages and repository uploading

Carlos J. Gil Bellosta cgb at datanalytics.com
Thu Jul 20 12:24:58 CEST 2006


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?

Thank you very much,

Carlos J. Gil Bellosta
http://www.datanalytics.com
http://www.data-mining-blog.com

Quoting Prof Brian Ripley <ripley at 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 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
>



More information about the R-help mailing list