D6793: adopt new KAboutLicense::spdx
Harald Sitter
noreply at phabricator.kde.org
Thu Jul 20 08:01:59 UTC 2017
sitter created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.
REVISION 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
REPOSITORY
R290 KPackage
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D6793
AFFECTED FILES
autotests/data/testfallbackpackage/testfallbackpackage.testappdataxml
autotests/data/testjsonmetadatapackage/testjsonmetadatapackage.testappdataxml
autotests/data/testpackage/testpackage.testappdataxml
autotests/data/testpackagesdep/testpackagesdep.testappdataxml
autotests/data/testpackagesdepinvalid/testpackagesdepinvalid.testappdataxml
autotests/packagemetadatatest.desktop
src/kpackagetool/kpackagetool.cpp
To: sitter, sebas
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170720/8d7da9ec/attachment.html>
More information about the Kde-frameworks-devel
mailing list