Re: [Rd] Vignette pdfs missing from zip file after Rcmd build --binary call

From: Eli Holmes <e2holmes_at_gmail.com>
Date: Thu, 07 Jul 2011 16:29:24 -0700

Thanks for the reply. In a round about way, it helped me figure out how to solve the problem. I had always called Rcmd build --binary first to make a zip file for windows users and in <2.11.0 this command added all the vignette pdfs to the source directory, and then I called Rcmd build --no-vignettes to prepare the tar.gz file. This made me realize that someone on a unix machine would not build the tar.gz file this way, and I should follow a more unix-like build sequence.

For the sake of documenting my solution, here's my responses and how they led to my solution. Note, I'm buildiing packages on a windows machine.

> It sort of defeats the purpose to create a tar ball and then not use it ;)

?? I do use it. The unix and mac users download the tar.gz file to install the package. I create windows binaries for windows users. In the past, I created the zip file from the source directory not the tar.gz built from the source directory using the command Rcmd build --binary FOO, where FOO is the source directory. BTW, I know the tar.gz file build on a windows machine is not perfect for mac/unix users; this is just for development in a small group with mac and windows users.

I've been building packages for years with 2.11.0 and below, but something has changed in 2.13.0 in how vignette pdfs are being transferred to the package zip files.

>> Things I have tried unsuccessful
>> I tried using the tar.gz file as the source
>
> That is indeed  the usual way.
>
> Can you be more specific as of what errors you get? It may point to issues in the your package. Also the command is R CMD INSTALL not install.

Sorry I meant to capitalize 'install'. I do call it that way. The error I got was
Warning: invalid package 'FOO.tar.gz'
Error: ERROR: no package specified

I assumed the error had to do with a tar.gz file not being a valid 'target' for Rcmd build. I have never seen a tar.gz file used in a Rcmd build call before. But your comment suggested that FOO.tar.gz should work, and on closer inspection, I realized I had misspelled the filename. Once I fixed that, R CMD install --build FOO.tar.gz worked and built the zip file.

>> Rcmd build --binary FOO.tar.gz  (got error)
cannot change to directory 'FOO.tar.gz' (ok, I just won't use that)
>> R CMD INSTALL --build FOO.tar.gz (built the package binaries in the zip file, so I'll switch to this)

Once I got here, I realized I could just build the zip file using 'R CMD INSTALL --build FOO.tar.gz' as appeared to be intended. But on closer inspection, my tar.gz file also appeared to be missing some of the vignette pdfs in a package that included a makefile in inst/doc. It turned out that this file did not have the line 'texi2dvi --pdf *.tex' to create pdfs from all the tex files after Rcmd's sweave call before it called the makefile. In R 2.11.0, these pdfs were being added to the source directory by the call 'Rcmd build --binary' . I never ran 'Rcmd build' first so never noticed that the tar.gz file from 'Rcmd build' would be missing vignette pdfs.

I added the line texi2dvi --pdf *.tex' to the makefile and everything seems ok now. So my new steps for building unix and windows packages is the following:

Rcmd build FOO (build the tar.gz file)
R CMD INSTALL --build FOO.tar.gz (build the windows binaries; I'm doing this on a windows machine btw).

Again, thanks!

--Eli



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 08 Jul 2011 - 11:30:35 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 08 Jul 2011 - 23:40:08 GMT.

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

list of date sections of archive