-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug, allows using ament_copyright with bsd3 #206
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the bs2 headers, exists a "{copyright_holder}" text that causes a problem when using the command ament_copyright to add headers to a source file. This fix adds a default value for that key, to match the original 3-Clause BSD text, and allowing to use the tool. Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com>
dirk-thomas
reviewed
Jan 29, 2020
Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com>
dirk-thomas
reviewed
Jan 29, 2020
Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com>
dirk-thomas
approved these changes
Jan 29, 2020
Based on https://answers.ros.org/question/353760/ament_copyright-add-missing-gives-keyerror-copyright_holder/ this should probably be backported to Eloquent. @mjcarroll Can you please do that (and check if it is also needed for Dashing)? |
mjcarroll
pushed a commit
that referenced
this pull request
Jun 18, 2020
* Fix bug, allows using ament_copyright with bsd3 In the bs2 headers, exists a "{copyright_holder}" text that causes a problem when using the command ament_copyright to add headers to a source file. This fix adds a default value for that key, to match the original 3-Clause BSD text, and allowing to use the tool. Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com> * Add copyright_name if template includes copyright_holder reference Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com> * Revert comma addition Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com>
mjcarroll
pushed a commit
that referenced
this pull request
Jun 18, 2020
In the bs2 headers, exists a "{copyright_holder}" text that causes a problem when using the command ament_copyright to add headers to a source file. This fix adds a default value for that key, to match the original 3-Clause BSD text, and allowing to use the tool. Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com>
mjcarroll
pushed a commit
that referenced
this pull request
Jun 18, 2020
In the bs2 headers, exists a "{copyright_holder}" text that causes a problem when using the command ament_copyright to add headers to a source file. This fix adds a default value for that key, to match the original 3-Clause BSD text, and allowing to use the tool. Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com> Signed-off-by: Michael Carroll <michael@openrobotics.org>
mjcarroll
pushed a commit
that referenced
this pull request
Jun 18, 2020
Backport of #206 for Dashing Fix bug, allows using ament_copyright with bsd3 In the bs2 headers, exists a "{copyright_holder}" text that causes a problem when using the command ament_copyright to add headers to a source file. This fix adds a default value for that key, to match the original 3-Clause BSD text, and allowing to use the tool. Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com> Signed-off-by: Michael Carroll <michael@openrobotics.org>
mjcarroll
added a commit
that referenced
this pull request
Jun 26, 2020
Backport of #206 for Dashing Fix bug, allows using ament_copyright with bsd3 In the bs2 headers, exists a "{copyright_holder}" text that causes a problem when using the command ament_copyright to add headers to a source file. This fix adds a default value for that key, to match the original 3-Clause BSD text, and allowing to use the tool. Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com> Signed-off-by: Michael Carroll <michael@openrobotics.org> Co-authored-by: Jorge Perez <j.j.perez13@hotmail.com>
mjcarroll
added a commit
that referenced
this pull request
Jun 26, 2020
In the bs2 headers, exists a "{copyright_holder}" text that causes a problem when using the command ament_copyright to add headers to a source file. This fix adds a default value for that key, to match the original 3-Clause BSD text, and allowing to use the tool. Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com> Signed-off-by: Michael Carroll <michael@openrobotics.org> Co-authored-by: Jorge Perez <j.j.perez13@hotmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To reproduce this bug you have to use the ament_copyright tool to try adding missing headers to a file, using the bsd2 license. After sourcing the ROS workspace:
ament_copyright --add-missing 'osrf' bsd2 src/ament/ament_lint/ament_copyright/test/cases/bsd_license/case.py
This will cause
KeyError: 'copyright_holder'
Format of the bsd2 license expected a command to pass a 'copyright_holder' key as a parameter to include in the license. However, the current CLI does not includes this. This quick fix uses as copyright holder this: 'the copyright holder', so the text match the condition as expressed in: https://opensource.org/licenses/BSD-3-Clause
Later on it could be discussed if it's a desirable solution to include adding this copyright holder variable in the cli.