[kpackage] /: Fix cmake failure when two packages with different type have same id

Bhushan Shah null at kde.org
Wed Dec 14 11:01:26 UTC 2016


Git commit 26e59d58438cc777873a6afc7817418ec735aaa3 by Bhushan Shah.
Committed on 14/12/2016 at 10:58.
Pushed by bshah into branch 'master'.

Fix cmake failure when two packages with different type have same id

Earlier we used to create temporary json in $component-metadata.json,
but this failed if we have two packages with same id, for instance in
phone there is org.kde.plasma.phone shell package and look-and-feel
package.

CCMAIL: release-team at kde.org
CCMAIL: distributions at kde.org
CCMAIL: faure at kde.org

Reviewed-by: notmart at gmail.com

David, can you please do 5.29 re-tar with this?

M  +2    -2    KF5PackageMacros.cmake

https://commits.kde.org/kpackage/26e59d58438cc777873a6afc7817418ec735aaa3

diff --git a/KF5PackageMacros.cmake b/KF5PackageMacros.cmake
index a14ab0b..4a4d081 100644
--- a/KF5PackageMacros.cmake
+++ b/KF5PackageMacros.cmake
@@ -36,8 +36,8 @@ function(kpackage_install_package dir component)
            PATTERN Messages.sh EXCLUDE
            PATTERN dummydata EXCLUDE)
 
-   if(NOT EXISTS ${component}-metadata.json)
-        set(GENERATED_METADATA "${CMAKE_CURRENT_BINARY_DIR}/${component}-metadata.json")
+   if(NOT EXISTS ${component}-${root}-metadata.json)
+        set(GENERATED_METADATA "${CMAKE_CURRENT_BINARY_DIR}/${component}-${root}-metadata.json")
         add_custom_command(OUTPUT ${GENERATED_METADATA}
                            COMMAND KF5::desktoptojson -i ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/metadata.desktop -o ${GENERATED_METADATA})
         add_custom_target(${component}-metadata-json ALL DEPENDS ${GENERATED_METADATA})


More information about the release-team mailing list