mirror of
http://code.qt.io/yocto/meta-qt6.git
synced 2026-01-01 13:58:07 +00:00
Verify QT_VERSION
Add task to verify that QT_VERSION matches the version used in the Qt sources. Pick-to: 6.8 Change-Id: I0065bf3bcda7174a337960f4ec1ac7c403599fcf Reviewed-by: Ari Parkkila <ari.parkkila@qt.io> Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io> (cherry picked from commite32ce33ee2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commite45ceca70d)
This commit is contained in:
parent
efdcfa06e2
commit
77171e9de8
22
classes/verify-qt-version.bbclass
Normal file
22
classes/verify-qt-version.bbclass
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
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
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ LIC_FILES_CHKSUM = " \
|
|||
file://LICENSES/Qt-GPL-exception-1.0.txt;md5=9a13522cd91a88fba784baf16ea66af8 \
|
||||
"
|
||||
|
||||
inherit qt6-cmake
|
||||
inherit qt6-cmake verify-qt-version
|
||||
|
||||
include recipes-qt/qt6/qt6-git.inc
|
||||
include recipes-qt/qt6/qt6.inc
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user