Skip to content
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

License mapping (URL to License Type) breaks other packages #75

Closed
wgnf opened this issue May 3, 2021 · 3 comments
Closed

License mapping (URL to License Type) breaks other packages #75

wgnf opened this issue May 3, 2021 · 3 comments

Comments

@wgnf
Copy link

wgnf commented May 3, 2021

Via --licenseurl-to-license-mappings one can provide a mapping from an URL to a license type.

I wanted to use this for a URLs where a License Type could not be determined. But this broke all other packages. I guess this is caused, because the other Packages' URLs do not mach with with the one provided in the mapping, hence it could not be determined.

I would prefer something like this:

  • Check if the URL of the package to process matches any URL in the provided mapping
  • If yes: Use the License Type from the Mapping
  • If no: Determine the License Type the usual way

Any thoughts?

@wgnf wgnf changed the title License mapping breaks other packages License (URL to License Type) mapping breaks other packages May 3, 2021
@wgnf wgnf changed the title License (URL to License Type) mapping breaks other packages License mapping (URL to License Type) breaks other packages May 3, 2021
@wgnf
Copy link
Author

wgnf commented May 3, 2021

Weird thing is tho, when I try to reproduce this while debugging everything works 🤔

@wgnf
Copy link
Author

wgnf commented May 3, 2021

Oh. I see why this happens. In my debugging case I obviously used the --licenseurl-to-license-mappings Command-Line-Parameter.

What I did not know (because it isn't documented and not really obvious) that the Tool already uses a default-set of URL-Mappings under the hood (see here), which are overwritten by my manual Parameter which in turn led me to be confused why suddenly all the MS-Packages won't have a License-Type anymore.

@wgnf
Copy link
Author

wgnf commented May 5, 2021

That leaves me with these questions:
Would it be desirable to merge the Mappings provided by --licenseurl-to-license-mappings with the already declared Default-Mappings (see above)?
Is there a use-case where a user would not want this to happen?

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

No branches or pull requests

2 participants