5

So I'm writing an R package. Part of the essential documentation is the DESCRIPTION file. In this DESCRIPTION file there is a line where one must specify the Licensing of the package for CRAN-sharability purposes.

I've tried inputting the license in any and every format I can think of, but it still fails when performing R CMD check --as-cran, stating

* checking DESCRIPTION meta-information ... WARNING Non-standard license specification: What license is it under? Standardizable: FALSE

So far I've tried:

License: GPL (>=3) License: GPL-3: License: GPL_3 License: GNU Affero General Public License License: GPL

and all of them throw the same error. What, in the name of all that is sacred, is the way this sneaky string is supposed to look like?

DESCRIPTION FILE:

Package: lucas
Type: Package
Title: Package to download and create the DB of LUCAS data harmonized
Version: 1.0
Date: 2020-04-28
Authors@R: c(person("Mom", "Iork", email = "samplemail@mail.com", role = c("aut")), person("La", "Ma", email = "samplemail@mail.com", role = c("cre")))
Maintainer: Jane Doe <samplemail@mail.com>
Authors: Mom Iork <samplemail@mail.com>, Jane Doe <samplemail@mail.com>, John Doe <samplemail@mail.com>
Description: Package to reproduce the harmonized DB of LUCAS points
Depends:
    R (>= 3.4),
    RPostgreSQL,
    rpostgis,
    plyr,
    stringr
Imports:
    RPostgreSQL,
    rpostgis,
    plyr,
    stringr
License: GPL (>=3)
LazyData: TRUE
RoxygenNote: 7.1.0
Encoding: UTF-8
Momchill
  • 417
  • 6
  • 15
  • 1
    It seems the check is done with the `tools:::.check_package_license()` function. Can you provide a complete DESCRIPTION file that can be used for testing? – MrFlick Apr 28 '20 at 16:08
  • Added to the original post. – Momchill Apr 28 '20 at 16:10
  • 2
    Actually, the real checking seems to happen in `tools:::analyze_license("GPL (>=3)")` and your license passes that check. When I run the checker on your sample file it passes just fine. What version of R are you running? Are you sure this is the file it's checking? The error message should print the bad value and since there is nothing there it's like the DESCRIPTION file cant be parsed or something. – MrFlick Apr 28 '20 at 16:18
  • Oooook, you were right, it wasn't pointing to the right place. Thanks! – Momchill Apr 28 '20 at 17:46
  • Important to say that the check happens to the already zipped tarball so any changes to the package or documentation thereof require a new compilation (build and install) before running check again. – Momchill Apr 28 '20 at 18:23

1 Answers1

1

For anyone still looks for answer. Use functions in usethis package https://usethis.r-lib.org/reference/licenses.html

For example, use_gpl_license().

Hsiao Yi
  • 117
  • 2
  • 13