summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-01-16 14:24:54 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-01-17 16:53:57 +0100
commitada434e417568457df252b6069ec51f6ba8335c8 (patch)
tree759bd9c772afae82222e4eebb2c4b2ff5b19c1ec /mkspecs
parent1b4aba0a59abeb27e3ef21391a39ca2093e4ca46 (diff)
permissions: Take PlistBuddy exit code into account when reading Info.plist
Otherwise we might conclude that we found a usage description when PlistBuddy outputs "Error Reading File: /tmp/Info.plist" to stdout. For CMake this is not an issue as we pipe stderr to a separate variable, that contains "Cannot parse a NULL or zero-length data" in this case. Fixes: QTBUG-109967 Pick-to: 6.5 Change-Id: I9d819b6de405b88bb7d1d75c22b6f5187f26e553 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/permissions.prf15
1 files changed, 12 insertions, 3 deletions
diff --git a/mkspecs/features/permissions.prf b/mkspecs/features/permissions.prf
index d80df6d01e..862f0cb58c 100644
--- a/mkspecs/features/permissions.prf
+++ b/mkspecs/features/permissions.prf
@@ -6,14 +6,23 @@ for(plugin, QT_PLUGINS) {
next()
usage_descriptions = $$eval(QT_PLUGIN.$${plugin}.usage_descriptions)
+
+ found_usage_description = false
for(usage_description_key, usage_descriptions) {
usage_description = $$system("/usr/libexec/PlistBuddy" \
- "-c 'print $$usage_description_key' $$QMAKE_INFO_PLIST 2>/dev/null")
- !isEmpty(usage_description): \
+ "-c 'print $$usage_description_key' $$QMAKE_INFO_PLIST 2>/dev/null", \
+ singleLine, exit_code)
+
+ !equals(exit_code, 0): \
+ next()
+
+ !isEmpty(usage_description) {
+ found_usage_description = true
break()
+ }
}
- isEmpty(usage_description): \
+ !$$found_usage_description: \
next()
request_flag = $$eval(QT_PLUGIN.$${plugin}.request_flag)