Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Dual License clarification #179

Closed
lgriffin opened this issue Oct 17, 2017 · 9 comments
Closed

Dual License clarification #179

lgriffin opened this issue Oct 17, 2017 · 9 comments
Assignees
Milestone

Comments

@lgriffin
Copy link
Contributor

lgriffin commented Oct 17, 2017

Awaiting clarification on dual licenses in our official canonical naming file. Will update this when Legal and Andrea come back to us!

@helio-frota
Copy link
Member

good progress on it:

using a foo-project:

[hf@localhost foo-project]$ license-reporter --html
<?xml version='1.0'?>
<licenseSummary>
    <project>foo-project</project>
    <version>1.0.0</version>
    <dependencies>
        <dependency>
            <packageName>JSONStream</packageName>
            <version>1.3.1</version>
            <licenses>
                <license>
                    <name>MIT License</name>
                    <url>http://www.opensource.org/licenses/MIT</url>
                </license>
            </licenses>
        </dependency>
        <dependency>
            <packageName>JSONStream</packageName>
            <version>1.3.1</version>
            <licenses>
                <license>
                    <name>Apache License 2.0</name>
                    <url>http://www.apache.org/licenses/LICENSE-2.0</url>
                </license>
            </licenses>
        </dependency>
    </dependencies>
</licenseSummary>
========= APPROVED LICENSES        ==========
name: JSONStream , version: 1.3.1 , licenses: Apache License 2.0
name: JSONStream , version: 1.3.1 , licenses: MIT License
========= APPROVED LICENSES        ==========

And the generated HTML shows JSONStream_MIT License.txt but in fact (when click on it ) is the Apache License file.
screenshot from 2017-10-24 20-41-38

@helio-frota
Copy link
Member

And the generated HTML shows JSONStream_MIT License.txt but in fact (when click on it ) is the Apache License file.

This means we need to add: 'No local license could be found for the dependency' instead.

@lgriffin
Copy link
Contributor Author

Looks good @helio-frota :)

I did mention to Andrea that we may have scenarios were one of the local licenses are not found. I'm wondering in that case should we tweak the text to indicate that not only the fact that the local text is missing but that it is indeed a dual license e.g. "No local license found as this is a dual license dependency" or words to that affect?

I'm wondering is there a technical reason we don't go down the route of embedding both licenses within the:
<licenses> attribute like Andrea mentioned?

Obviously both are correct this is more a curious question :)

@helio-frota
Copy link
Member

I was able to add both licenses within the <licenses> attribute, but the html report is using the data and gets corrupted with glitches.

[hf@localhost foo-project]$ license-reporter
<?xml version='1.0'?>
<licenseSummary>
    <project>foo-project</project>
    <version>1.0.0</version>
    <dependencies>
        <dependency>
            <packageName>JSONStream</packageName>
            <version>1.3.1</version>
            <licenses>
                <license>
                    <name>MIT License</name>
                    <url>http://www.opensource.org/licenses/MIT</url>
                </license>
                <license>
                    <name>Apache License 2.0</name>
                    <url>http://www.apache.org/licenses/LICENSE-2.0</url>
                </license>
            </licenses>
        </dependency>
    </dependencies>
</licenseSummary>

@helio-frota
Copy link
Member

I was working on another branch to solve this kind of problem related with the same data affected by other functions.
https://github.com/helio-frota/license-reporter/tree/pr

( this branch is related to #226 and will need more time )

I'll try to replicate the data that goes to html or try to solve directly, to be able to finish this issue.

@helio-frota
Copy link
Member

PR sent,

To not have problems with HTML report we need to duplicate the license as discussed.
( but on console stdout it will continue to print duplicated <dependency> entry, instead
both licenses within the <licenses> attribute )

To show both licenses within the <licenses> attribute we need to choose the option to export to file or only to stdout license-reporter --json or just license-reporter.

This seems to be a side effect of not using commands #226

@helio-frota
Copy link
Member

@lgriffin

landed here a272cad

Thanks!

@helio-frota
Copy link
Member

@lgriffin #226 (comment)

@helio-frota
Copy link
Member

PR merged, I'm going to close this, but I'll keep on the remaining items
of this comment: #226 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants