Arne Henningsen
2006-Sep-28 11:36 UTC
[Rd] R CMD build when the package name is different from the directory name
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>"). Is there a possibility to tell "R CMD build" to use the correct package name ("R CMD check" uses the correct package name.) Can you change the (default) behaviour of "R CMD build" in future releases? Do I have to change the file name and/or the name of the base directory before uploading the package to CRAN? I use R version 2.3.1 (2006-06-01) on i686-pc-linux-gnu. The same happens with R version 2.4.0 RC. Thanks, Arne -- Arne Henningsen Department of Agricultural Economics University of Kiel Olshausenstr. 40 D-24098 Kiel (Germany) Tel: +49-431-880 4445 Fax: +49-431-880 1397 ahenningsen at agric-econ.uni-kiel.de http://www.uni-kiel.de/agrarpol/ahenningsen/
Gabor Grothendieck
2006-Sep-28 13:30 UTC
[Rd] R CMD build when the package name is different from the directory name
Another possibility is to store your code in svn or other version control system. On 9/28/06, Arne Henningsen <ahenningsen at agric-econ.uni-kiel.de> wrote:> 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>"). > > Is there a possibility to tell "R CMD build" to use the correct package name > ("R CMD check" uses the correct package name.) Can you change the (default) > behaviour of "R CMD build" in future releases? > > Do I have to change the file name and/or the name of the base directory before > uploading the package to CRAN? > > I use R version 2.3.1 (2006-06-01) on i686-pc-linux-gnu. > The same happens with R version 2.4.0 RC. > > Thanks, > Arne > > -- > Arne Henningsen > Department of Agricultural Economics > University of Kiel > Olshausenstr. 40 > D-24098 Kiel (Germany) > Tel: +49-431-880 4445 > Fax: +49-431-880 1397 > ahenningsen at agric-econ.uni-kiel.de > http://www.uni-kiel.de/agrarpol/ahenningsen/ > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >
Seth Falcon
2006-Sep-28 14:22 UTC
[Rd] R CMD build when the package name is different from the directory name
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. It is a feature because it allows me to distinguish the tarballs from each other. 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 As another poster suggested, an SCM is the right tool for tracking versions. + seth