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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With