<table><tr><td style="">sitter created this revision.<br />Restricted Application added a project: Frameworks.<br />Restricted Application added a subscriber: Frameworks.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D6793" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Previously we'd use the verbatim License key of the kpackage desktop file<br />
as license in appstream. This is however incorrect since appstream expects<br />
SPDX license expressions which use a different format than the one we<br />
use to express KAboutLicenses. This resulted in basically every kpackage<br />
which has an appstream metadata file to cause warnings in our CI and the<br />
distribution generator tool as the license field was using an invalid<br />
format. To resolve this situation a new spdx() method was added to<br />
KAL allowing the conversion from our strings to SPDX compliant expressions.</p>
<p>This additionally tracks and-later-versions qualification (i.e. trailing<br />
plus signs to indicate leter versions than the one defined are acceptable).</p>
<p>To adopt this we now construct a KAL from the keyword string and then<br />
grab the spdx() of that for use as the appstream license.<br />
Also the test desktop file and expectations were adjusted for this and<br />
now include an and-later-versions qualification to make sure that works<br />
as well.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>tests pass</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R290 KPackage</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D6793" rel="noreferrer">https://phabricator.kde.org/D6793</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/data/testfallbackpackage/testfallbackpackage.testappdataxml<br />
autotests/data/testjsonmetadatapackage/testjsonmetadatapackage.testappdataxml<br />
autotests/data/testpackage/testpackage.testappdataxml<br />
autotests/data/testpackagesdep/testpackagesdep.testappdataxml<br />
autotests/data/testpackagesdepinvalid/testpackagesdepinvalid.testappdataxml<br />
autotests/packagemetadatatest.desktop<br />
src/kpackagetool/kpackagetool.cpp</div></div></div><br /><div><strong>To: </strong>sitter, sebas<br /><strong>Cc: </strong>Frameworks<br /></div>