D7069: kpackagetool can now write appstream data to a file

Harald Sitter noreply at phabricator.kde.org
Wed Aug 2 10:54:27 UTC 2017


sitter created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  Previously kpackagetool used STDOUT as output for the appstream xml data
  it generated. This has various problems:
  
  - cannot print arbitrary stuff on stdout
  - cmake capturing stdout will always create a file even when there was no output
  - NoDisplay sensitive can result in exit(0) but no output resulting in such an empty file
  - appstreamcli will complain about bogus files (e.g. empty files)
  - complaints from appstreamcli are treated as test failures
  
  There now is a `--appstream-metainfo-output PATH` argument for kpackagetool
  which switches the tool from STDOUT output mode to file output mode.
  This new mode is used by the kpackage macro to generate appstream data,
  meaning we won't be creating empty files anymore.
  
  kpackagetool testing has been complicated a bit to make sure backwards
  compatible stdout output mode works as well as NoDisplay containing desktop
  files causing no empty files when used with the new file output mode.
  To implement the test NoDisplay checks have been made more aggressive as
  the data structure of Generic packages is actually incompatible with what
  we checked for in kpackagetool, the tool now tries very aggressively to
  find a NoDisplay property.
  
  this fixes a majority of test issues caused by automatic creation of
  appstream data for plasma applets as they no longer create empty files.
  
  CHANGELOG: kpackagetool now can output appstream data to a file

TEST PLAN
  - old tests pass
  - new test passes
  - plasma-workspace no longer generates bogus appstream xml files

REPOSITORY
  R290 KPackage

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D7069

AFFECTED FILES
  KF5PackageMacros.cmake
  autotests/CMakeLists.txt
  autotests/data/testpackage-nodisplay/contents.hash
  autotests/data/testpackage-nodisplay/contents/images/empty.png
  autotests/data/testpackage-nodisplay/contents/ui/main.qml
  autotests/data/testpackage-nodisplay/contents/ui/otherfile.qml
  autotests/data/testpackage-nodisplay/metadata.desktop
  autotests/kpackagetoolappstreamtest.cmake
  src/kpackagetool/kpackagetool.cpp
  src/kpackagetool/main.cpp

To: sitter, apol, sebas, mart
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170802/851ab098/attachment.html>


More information about the Kde-frameworks-devel mailing list