adopt new KAboutLicense::spdx
ClosedPublic

Authored by sitter on Jul 20 2017, 8:01 AM.

Details

Summary

Previously we'd use the verbatim License key of the kpackage desktop file
as license in appstream. This is however incorrect since appstream expects
SPDX license expressions which use a different format than the one we
use to express KAboutLicenses. This resulted in basically every kpackage
which has an appstream metadata file to cause warnings in our CI and the
distribution generator tool as the license field was using an invalid
format. To resolve this situation a new spdx() method was added to
KAL allowing the conversion from our strings to SPDX compliant expressions.

This additionally tracks and-later-versions qualification (i.e. trailing
plus signs to indicate leter versions than the one defined are acceptable).

To adopt this we now construct a KAL from the keyword string and then
grab the spdx() of that for use as the appstream license.
Also the test desktop file and expectations were adjusted for this and
now include an and-later-versions qualification to make sure that works
as well.

Test Plan

tests pass

Diff Detail

Repository
R290 KPackage
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter created this revision.Jul 20 2017, 8:01 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptJul 20 2017, 8:01 AM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
sitter added a reviewer: apol.Jul 20 2017, 8:02 AM
apol accepted this revision.Jul 23 2017, 3:42 PM
This revision is now accepted and ready to land.Jul 23 2017, 3:42 PM
This revision was automatically updated to reflect the committed changes.