From lg390 at cam.ac.uk  Wed Nov 27 10:42:18 2013
From: lg390 at cam.ac.uk (Laurent Gatto)
Date: Wed, 27 Nov 2013 09:42:18 +0000
Subject: [Rd] Blank lines in DESCRIPTION
In-Reply-To: <8478DC28-2761-42A6-835E-26799B092155@r-project.org>
References: <87eh6222bp.fsf@cam.ac.uk>
	<8478DC28-2761-42A6-835E-26799B092155@r-project.org>
Message-ID: <877gbu18qt.fsf@cam.ac.uk>


> Laurent,
>
> blank lines between records are not allowed in DESCRIPTION, because
> they separate paragraphs in DCF and a package must consist of a single
> paragraph. This properly is used by R for multi-package DCF files
> where each paragraph defines one package. Blank lines at the end may
> be tolerated, because there is no second paragraph in that case. If
> you look at the commit you quote (r60495), it specifically adds an
> error if there is more than one paragraph.

Thank you very much for the clarification - makes perfect sense now!

Laurent

> Cheers,
> Simon
>
>
> On Nov 26, 2013, at 6:03 PM, Laurent Gatto <lg390 at cam.ac.uk> wrote:
>
>> Dear R-devel list,
>> 
>> I would like to enquire about the existence of blank lines in the
>> DESCRIPTION file.
>> 
>> Testing different possibilities with tools:::.read_description suggests
>> that starting or ending with blank lines is acceptable while blank lines
>> in the middle of the file get caught by
>> 
>> out <- tryCatch(read.dcf(dfile, keep.white = .keep_white_description_fields), 
>>        error = function(e) stop(gettextf("file '%s' is not in valid DCF format", 
>>            dfile), domain = NA, call. = FALSE))
>> if (nrow(out) != 1) 
>>    stop("contains a blank line", call. = FALSE)
>> 
>> and produce the error. 
>> 
>> However, the following news item from [1] seems to suggest that it
>> should not fail in case of such incorrect blank lines.
>> 
>> R CMD check no longer fails with an error if a ?DESCRIPTION? file incorrectly contains a blank line. (Reported by Bill Dunlap.)
>> 
>> This has come up here [2], when github-specific information is appended
>> to a DESCRIPTION file that ends with a blank line.
>> 
>> Thank you very much in advance.
>> 
>> Best wishes,
>> 
>> Laurent
>> 
>> [1] http://cran.r-project.org/bin/windows/base/old/2.15.3/NEWS.R-2.15.3.html
>> [2] https://github.com/hadley/devtools/issues/383
>> 
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Blank lines in DESCRIPTION
Laurent Gatto