Bug 17170 - R CMD build cannot build a tarball with implicit \Sexpr{} in the documentation if there are unmet dependencies
Summary: R CMD build cannot build a tarball with implicit \Sexpr{} in the documentatio...
Status: UNCONFIRMED
Alias: None
Product: R
Classification: Unclassified
Component: Installation (show other bugs)
Version: R-devel (trunk)
Hardware: All Linux
: P5 trivial
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2016-10-25 05:30 UTC by Pavel N. Krivitsky
Modified: 2016-10-25 22:17 UTC (History)
1 user (show)

See Also:


Attachments
Source code of the minimal reproducible example package, in tar.bz2 format. (1.71 KB, application/x-bzip)
2016-10-25 05:30 UTC, Pavel N. Krivitsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel N. Krivitsky 2016-10-25 05:30:22 UTC
Created attachment 2173 [details]
Source code of the minimal reproducible example package, in tar.bz2 format.

Overview:

In package development and testing, it is sometimes helpful to be able to build a source tarball of a package without all of the package's dependencies being installed on the system. This does not appear to be possible with R 3.3.1 or the trunk, because any \Sexpr{} in the documentation (including implicit invocations like \doi{}) forces an

* installing the package to process help pages

step, which fails if any of the package's dependencies are missing. This happens both with and without the --no-manual option.

In my opinion, either --no-manual should override attempts to parse \Sexpr{} expressions or another option should.


Steps to Reproduce:

1) Download and unpack anRpackage.tar.bz2: this is a package source constructed with package.skeleton() with minimal changes. (Note that is just an archive containing the package source, not a proper tarball; the extension is deliberately different.)

2) Run 

R CMD build --no-manual --no-build-vignettes --no-resave-data anRpackage


Expected Results:
After checking meta-information, cleaning src, excluding invalid files, etc., a source tarball is produced.


Actual Results:
* checking for file ‘anRpackage/DESCRIPTION’ ... OK
* preparing ‘anRpackage’:
* checking DESCRIPTION meta-information ... OK
* installing the package to process help pages
      -----------------------------------
ERROR: dependency ‘nonexistent’ is not available for package ‘anRpackage’
* removing ‘/tmp/RtmpNyiC5v/Rinst784770616129/anRpackage’
      -----------------------------------
ERROR: package installation failed


Note that if 'nonexistent' is removed from dependencies in DESCRIPTION, a tarball is built successfully:
* checking for file ‘anRpackage/DESCRIPTION’ ... OK
* preparing ‘anRpackage’:
* checking DESCRIPTION meta-information ... OK
* installing the package to process help pages
* saving partial Rd database
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building ‘anRpackage_1.0.tar.gz’
Comment 1 Pavel N. Krivitsky 2016-10-25 22:17:42 UTC
A clarification: It looks like the \doi{} use of \Sexpr{} in particular is in the trunk and not 3.3.1, but the forced install issue is present in 3.3.1 at least, and "anRpackage" created by package.skeleton() uses \Sexpr{} in some other ways.