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

Show package license #81

Merged
merged 1 commit into from
Jun 21, 2019
Merged

Show package license #81

merged 1 commit into from
Jun 21, 2019

Conversation

fingolfin
Copy link
Member

This is meant to show the package license, if specified in PackageInfo.g, for package pages like https://www.gap-system.org/Packages/gapdoc.html

However, I was not able to test this, as I have no suitable test environment for this code.

@olexandr-konovalov
Copy link
Member

Looks good to me - I will wait for the chance to test and merge it during the next release.

@fingolfin
Copy link
Member Author

OK, great. Once this has been merged, we can close gap-system/gap#997

# license ...
if IsBound(info.License) then
Append(res, Concatenation("<h4>License</h4>\n<p>",
"<p><a href='https://spdx.org/licenses/",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this is too simplistic in general, it can't deal with complex license constructs involving operators like AND, OR -- see also https://spdx.org/spdx-specification-21-web-version

A few packages use these (but AFAIK none uses WITH). Specifically, matrgrp has GPL-2.0 OR GPL-3.0, while profiling has MIT AND CDDL-1.0 as license.

I guess I could implement a function that deconstructs a "complex" SPDX license string, and use it here and in GitHubPagesForGAP. Though I guess at least initially, I'd restrict it at first to only support pure disjunctions and conjunctions, and no parenthesis.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Despite my comment here, I think we could merge this as is -- right now, exactly two packages would have broken license links, and I think that's acceptable. Or, if you disagree, we could just handle those two special cases.
In any case, it would be really helpful if this change gets tested during the next distribution release; it's much easier to refine something that is known to at least work rudimentary, than to flail around with completely untested code. (That said, of course best would be if I have a clue how to test this code in the first place :-( ).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, should be doable when GAP 4.10.2 comes shortly.

@olexandr-konovalov olexandr-konovalov merged commit 6fc6eb5 into gap-system:master Jun 21, 2019
@fingolfin fingolfin deleted the mh/license branch September 4, 2019 22:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants