[kpackage] /: Fix generating the metadata.json file

Bhushan Shah bhush94 at gmail.com
Mon Nov 7 11:44:46 UTC 2016


Git commit 22c471f9b2546395bea356bc02faa0803b1dcd14 by Bhushan Shah.
Committed on 07/11/2016 at 11:41.
Pushed by bshah into branch 'master'.

Fix generating the metadata.json file

kpackage_install_package macro takes dir as argument, some usage of it
passes it directory path instead of directory itself, as in foo/bar
instead of bar. 5ce8fe3462c2d40dcf8 commit broke this behavior.

This fixes it by replacing name of temporary json file to
$component-metadata.json instead of $dir/metadata.json.

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

Reviewed-by: Marco Martin <notmart at gmail.com>

David, can you please re-do 5.28 kpackage tarball with this commit?

M  +2    -2    KF5PackageMacros.cmake

http://commits.kde.org/kpackage/22c471f9b2546395bea356bc02faa0803b1dcd14

diff --git a/KF5PackageMacros.cmake b/KF5PackageMacros.cmake
index f544cf5..c8f22dd 100644
--- a/KF5PackageMacros.cmake
+++ b/KF5PackageMacros.cmake
@@ -37,8 +37,8 @@ function(kpackage_install_package dir component)
            PATTERN Messages.sh EXCLUDE
            PATTERN dummydata EXCLUDE)
 
-   if(NOT EXISTS ${dir}/metadata.json)
-        set(GENERATED_METADATA "${CMAKE_CURRENT_BINARY_DIR}/${dir}-metadata.json")
+   if(NOT EXISTS ${component}-metadata.json)
+        set(GENERATED_METADATA "${CMAKE_CURRENT_BINARY_DIR}/${component}-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