Devtools: MIT license template

Created on 30 Sep 2016  Â·  7Comments  Â·  Source: r-lib/devtools

If I do this in the description file: License: MIT

Then I get no warning but 1 Note. The note is checking DESCRIPTION meta-information ... NOTE
License components which are templates and need '+ file LICENSE':
MIT_

If I do this in the description file: License: MIT + file LICENSE

Then I get 1 warning and no note:
The warning is checking DESCRIPTION meta-information ... WARNING
Invalid license file pointers: LICENSE

I have the LICENSE.txt file in the directory all the time.

I have a hunch there is something very simple that I am overlooking but it is getting annoying and I just cant figure it out. Can you please help?

Thank you.

P.S. The content of the LICENSE.txt file is
"
MIT License

Copyright (c) [2016] [Michael J. Daniels]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"

EDIT:

I changed the content of the LICENSE.txt to "
"
YEAR: 2016
COPYRIGHT HOLDER: My Name
"

Still the same error! *_checking DESCRIPTION meta-information ... WARNING
Invalid license file pointers: LICENSE
*_

Most helpful comment

@lnalborczyk Also note devtools includes devtools::use_mit_license(), which will set this up for you, so you don't need to do it manually.

All 7 comments

Same error for me, though I have a "LICENSE.md" file in a "LICENSE" sub-directory...

* checking DESCRIPTION meta-information ... WARNING
Invalid license file pointers: LICENSE

Trying naming this file LICENSE without any extension.

Thanks for the help but it did not solve my problem. I also tried to put the LICENSE file either in a license or an inst subdirectory but nothing worked. I changed the License field of my DESCRIPTION file from MIT to GPL-3 as a temporary solution but the "MIT bug" seems to be tough...

That's odd. I am able to reproduce your warning in a successfully-building package by renaming the extra MIT license file to LICENSE.txt. But it also generates a NOTE about a non-standard file/directory LICENSE.txt. You don't get this note?

Status: 1 WARNING, 1 NOTE
checking DESCRIPTION meta-information ... WARNING
Invalid license file pointers: LICENSE

checking top-level files ... NOTE
Non-standard file/directory found at top level:
  ‘LICENSE.txt’

Check .Rbuildignore. Is there's something there that's causing your license file to be ignored?

You're right, _completely_ (i.e., not only visually in Finder but by modifying file parameters( with cmd+i, in mac osx)) removing the file extension solved my problem, thanks.

@lnalborczyk Also note devtools includes devtools::use_mit_license(), which will set this up for you, so you don't need to do it manually.

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

coatless picture coatless  Â·  5Comments

hadley picture hadley  Â·  3Comments

asimumba picture asimumba  Â·  6Comments

stevecondylios picture stevecondylios  Â·  3Comments

lindbrook picture lindbrook  Â·  4Comments