mirror of
http://code.qt.io/yocto/meta-qt6.git
synced 2026-01-01 13:58:07 +00:00
Add task to verify that QT_VERSION matches the version used in the Qt sources.
Pick-to: 6.10 6.8
Change-Id: I0065bf3bcda7174a337960f4ec1ac7c403599fcf
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
(cherry picked from commit e32ce33ee2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
23 lines
660 B
Plaintext
23 lines
660 B
Plaintext
python do_verify_qt_version() {
|
|
import os, re
|
|
|
|
qt_version = d.getVar('QT_VERSION')
|
|
|
|
cmake_conf = os.path.join(d.getVar('S'), '.cmake.conf')
|
|
with open(cmake_conf, 'r', encoding='utf-8') as f:
|
|
data = f.read()
|
|
|
|
m = re.search(r'set\(QT_REPO_MODULE_VERSION "([0-9.]+)"\)', data)
|
|
if not m:
|
|
bb.fatal("Could not parse QT_REPO_MODULE_VERSION from %s" % cmake_conf)
|
|
|
|
repo_version = m.group(1)
|
|
|
|
if qt_version != repo_version:
|
|
bb.fatal("Qt version mismatch: QT_VERSION (%s) does not match the sources (%s)" \
|
|
% (qt_version, repo_version))
|
|
}
|
|
|
|
addtask verify_qt_version after do_patch before do_configure
|
|
|