You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
schema/ListedLicense: Add obsoletedBy to licenses and exceptions
From [1]:
As a result, a number of licenses formerly included in the SPDX
License List have been deprecated as licenses, and correct usage
employs the License Expression Syntax as of v2.0.
So the sole reason for the deprecations seems to be "there's a better
way to say that now".
Telling people "use an expression instead" is less useful than saying
"use this expression instead: $SOME_EXPRESSION". This commit updates
the schema to allow us to recommend replacements. Consumers can use
logic like:
1. Parse a license expression to extract the short identifiers.
2. Look up obsoletedBy entries for the short identifiers.
3. If any obsoletedBy has an 'expression' attribute that matches the
source, the value of that obsoletedBy is the recommended
replacement for that expression. Otherwise, the value of the
obsoletedBy without an expression attribute is the recommended
replacement for the short identifier.
For example, the expression:
GPL-2.0+ WITH GCC-exception-2.0
could be parsed to either of the following short license identifiers:
* GPL-2.0+, in which case there would be a single obsoletedBy with no
expression attribute:
<obsoletedBy>GPL-2.0-or-later</obsoletedBy>
So the recommended replacement for GPL-2.0+ would be
GPL-2.0-or-later.
* GPL-2.0, in which case there would be two obsoletedBy values:
<obsoletedBy>GPL-2.0-only</obsoletedBy>
<obsoletedBy expression="GPL-2.0+">GPL-2.0-or-later</obsoletedBy>
The one with an 'expression' attribute set to 'GPL-2.0+' matches the
source, so the recommended replacement for GPL-2.0+ is
GPL-2.0-or-later.
The presence of an obsoletedBy element is sufficient to mark a
license/expression obsolete (as is the presence of an
deprecatedVersion attribute), so I'm in favor of dropping isDeprecated
to stay DRY. However, removing isDeprecated (from this repository, we
would still supply it in license-list-data) has proven contentious for
reasons I don't understand. This commit punts on the removal for now
[2].
[1]: spdx#392 (comment)
[2]: spdx#392 (comment)
0 commit comments