Re: [Rd] R CMD build --resave-data

From: Simon Urbanek <simon.urbanek_at_r-project.org>
Date: Tue, 12 Apr 2011 22:49:17 -0400

On Apr 12, 2011, at 10:26 PM, Hadley Wickham wrote:

>>> If you deliberately ignore the fact that 'R CMD INSTALL' is also used
>>> by developers to install from the *package source tree* (by opposition
>>> to end users who use it to install from a *source tarball*,
>> 
>> .. for a good reason, IMHO no serious developer would do that for obvious reasons - you'd be working on a dirty copy creating many unnecessary problems and polluting your sources. The first time you'll spend an hour chasing a non-existent problem due to stale binary objects in your tree you'll learn that lesson ;). The fraction of a second spent in R CMD build is well worth the hours saved. IMHO the only valid reason to run INSTALL on a (freshly unpacked tar ball) directory is to capture config.log.

>
> This is news to me! I know that you're supposed to run R CMD check on
> the built package, but you're supposed to run install on it too? (And
> if it's so important, why doesn't R do it for you automatically?)
>

I'm not saying "supposed to" I'm saying wise to. And the "IMHO"s above were what I really meant. By all means, you're free to do anything as long as you don't ask on the mailing list that something doesn't work because you ran it on a stale directory ;).

> Do you have any convenient shortcuts to overcome the fact that the
> binary package contains the package name? i.e. how can I build and
> install/check in a single line without having to specify the full file
> name?
>
> How can I go from:
>
> R CMD build plyr && R CMD install plyr_1.5.tar.gz
>

Some will argue that's an invalid command to start with ;). But other than that I see nothing wrong with it ... it's what I do to be honest ... (except where I don't, but that has to do with my custom build script legacy which has a defined way to get versions on the shell, long story...).

> to
>
> R CMD build-and-install plyr ?
>

R CMD build plyr && R CMD INSTALL plyr_*

... if you don't keep too many version in the same directory ;) - but it's not something I would use. For the paranoid

R CMD build plyr && R CMD INSTALL plyr_`sed -n 's/Version: *//p' plyr/DESCRIPTION`.tar.gz

But, seriously, that is the least problem I see - you'd have to advance your version numbers very quickly to get the version command out of your shell history...

Cheers,
Simon



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 13 Apr 2011 - 02:51:56 GMT

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 Wed 13 Apr 2011 - 12:50:44 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