R CMD check fails if Depends field includes a package with a `.' in it (PR#1591)

a296180@mica.fmr.com a296180@mica.fmr.com
Wed, 22 May 2002 15:57:02 +0200 (MET DST)


R CMD check fails when the Depends field in the DESCRIPTION file includes a
single package with `.' in the name.

* checking for file 'financials/DESCRIPTION' ... OK
* checking package directory ... OK
* checking DESCRIPTION Package field ... OK
* checking DESCRIPTION Version field ... OK
* checking DESCRIPTION License field ... OK
* checking DESCRIPTION Description field ... OK
* checking DESCRIPTION Title field ... OK
* checking DESCRIPTION Author field ... OK
* checking DESCRIPTION Maintainer field ... OK
* checking DESCRIPTION Depends field ... ERROR
Malformed Depends field.
See the information on DESCRIPTION files in section 'Creating R packages'
of the 'Writing R Extensions' manual.
mica|tmp> 

Assuming that `.' is allowed in a package name (there are two such packages on
CRAN and I could find nothing to the contrary in Writing R Extensions), the
following line in check should be changed from:

$dep =~ /^\s*(\w+)(\s*\(([^) ]+)\s+([^) ]+)\))?\s*$/;

to:

$dep =~ /^\s*([\w\.]+)(\s*\(([^) ]+)\s+([^) ]+)\))?\s*$/;	

that is, (\w+) becomes ([\w\.]+) in order to match names that have a
`.'. Thanks to David Brahm for suggesting this fix.

Regards,

Dave Kane

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._