[Rd] R CMD build when the package name is different from the directory name

Uwe Ligges ligges at statistik.uni-dortmund.de
Fri Sep 29 10:59:56 CEST 2006



Arne Henningsen wrote:
> Dear Seth,
> 
> Thank you for your message.
> 
> On Thursday 28 September 2006 16:22, Seth Falcon wrote:
>> Arne Henningsen <ahenningsen at agric-econ.uni-kiel.de> writes:
>>> Hi,
>>>
>>> I was really happy when I saw that in R version 2.3.0 "R CMD check" works
>>> for packages whose package name is different from the directory name in
>>> which it is located (see http://cran.r-project.org/src/base/NEWS).
>>> Now, I can have branches of my packages in directories like
>>> "[...]/branches/<version number>/", while I had to use
>>> "[...]/branches/<version number>/<package name>" before.
>>> "R CMD check <version number>" runs as expected but when I build the
>>> package with "R CMD build <version number>", the file name of the source
>>> package is "<version number>_<version number>-<patch level>.tar.gz" (and
>>> not "<package name>_<version number>-<patch level>.tar.gz"). Furthermore
>>> the base directory inside the .tar.gz archive is "<version number>" (and
>>> not "<package name>").
>> I think that's a feature.  Note that R CMD INSTALL on such a package
>> does install the package under its "real" name.
> 
> I don't think that this is a feature -- it is IMHO rather a bug. While "R CMD 
> check" and "R CMD INSTALL" take the real name (as expected), "R CMD build" 
> does not.
> 
> However, if I don't have to change the file name and the name of the base 
> directory before uploading the package to CRAN, the current behaviour of 
> "R CMD build" is IMHO acceptable. (I did not yet get an answer on my question 
> regarding CRAN.)
> 
>> It is a feature because it allows me to distinguish the tarballs from
>> each other.
> 
> You can distinguish the tarballs according their version number and patch 
> level (they are called "<package name>-<version number>-<patch level>.tar.gz"
> 
>> Perhaps you can make this work for you by using a more meaningful
>> description than version number in your branch name.  For example:
>>
>> .../branches/foo-release
>> .../branches/foo-devel
>> .../branches/foo-someNewFeature
> 
> In this case, the file name of the package is e.g. 
> "<package name>-release-<version number>-<patch level>.tar.gz" 
> and the base directory is e.g.
> "<package name>-release".
> Is this accepted on CRAN?

No.

Uwe Ligges


>> As another poster suggested, an SCM is the right tool for tracking
>> versions.
>>
>> + seth
> 
> Arne
> 
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>




More information about the R-devel mailing list