[sysadmin/ci-tooling] helpers: Ensure the cmake dependency metadata extraction process only runs for our primary platforms.

Ben Cooksley null at kde.org
Fri Jan 5 10:37:19 UTC 2018


Git commit a603dc47b518eb1f6d94379f19345748ebd7fb3a by Ben Cooksley.
Committed on 05/01/2018 at 10:37.
Pushed by bcooksley into branch 'master'.

Ensure the cmake dependency metadata extraction process only runs for our primary platforms.
Frameworks had a slight issue here as it has both Qt 5.10 and Qt 5.7 builds on Linux at the moment.
Depending on the assigned builders it is quite possible both builds when triggered will reach this script at essentially the same time, creating a race condition when it comes to updating the destination server (api.kde.org)
To ensure we don't fail, ensure we only run on the primary platforms.

CCMAIL: kde-frameworks-devel at kde.org

M  +6    -0    helpers/extract-cmake-dependency-metadata.py

https://commits.kde.org/sysadmin/ci-tooling/a603dc47b518eb1f6d94379f19345748ebd7fb3a

diff --git a/helpers/extract-cmake-dependency-metadata.py b/helpers/extract-cmake-dependency-metadata.py
index 96f8428..2e39612 100755
--- a/helpers/extract-cmake-dependency-metadata.py
+++ b/helpers/extract-cmake-dependency-metadata.py
@@ -25,6 +25,12 @@ buildEnvironment = EnvironmentHandler.generateFor( installPrefix=arguments.using
 sourcesLocation = os.getcwd()
 buildLocation = CommonUtils.buildDirectoryForSources( sources=sourcesLocation, inSourceBuild=buildSpecification['in-source-build'] )
 
+# Are we allowed to run?
+# We only gather this metadata from the principal Linux platform, which at the moment is SUSEQt5.7 for Frameworks and SUSEQt5.9 for everyone else
+if arguments.platform != 'SUSEQt5.7' and arguments.platform != 'SUSEQt5.9':
+	# Then there is nothing for us to do
+	sys.exit(0)
+
 # Determine the name we'll use to store the results, as well as the local and remote paths it will be stored at
 # We use the package name as it's pretty much guaranteed to be unique among all the builds we will be running
 # As the CMake dependency metadata is only used by Linux packagers, we don't need to take platform into account here


More information about the Kde-frameworks-devel mailing list