"Repository:" field in R DESCRIPTION files
Asked Answered
O

1

11

Question: What is the purpose and origin of the Repository: field in a package DESCRIPTION file?

It doesn't seem to be mentioned in the official docs for DESCRIPTION files, nor in Hadley's book. It seems to be auto-populated during CRAN upload - e.g. it's not in dplyr's original DESCRIPTION source, but it's present in the CRAN tarball DESCRIPTION:

...
Maintainer: Hadley Wickham <[email protected]>
Repository: CRAN
Date/Publication: 2019-05-14 12:20:03 UTC

Background: I ask because packrat seems to use the presence/absence of this field to determine whether a package can be found in a repository somewhere - if not, it requires you to download it manually. This is a problem for locally-developed packages that are hosted in a local CRAN-like repository.

We can start adding the Repository: field to our local packages, but that's kind of a pain to do with all the previous versions, it will mess up their tarball checksum, etc. And I wouldn't want to do it without understanding what it's for.

Outlying answered 23/5, 2019 at 14:49 Comment(1)
Update: I found an open packrat ticket from a few months ago about this: github.com/rstudio/packrat/issues/528Outlying
O
3

It seems to be a field added silently by both CRAN and Bioconductor, and taken advantage of by packrat. I contributed a Pull Request (now merged) to allow the field to be missing: https://github.com/rstudio/packrat/pull/569. The GitHub issue has now been resolved: https://github.com/rstudio/packrat/issues/528.

Outlying answered 19/8, 2019 at 14:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.