From a6c21eed2123d7a24ffd7fa47fd79385556120f9 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Fri, 17 Nov 2023 08:00:21 +0000 Subject: [PATCH] srcrev_update: support for all recipes Add variable to find base dir for meta-qt6 and use that in srcrev-update to support using it in any recipe. Pick-to: 6.7 6.6 Change-Id: I91960508a8ec96ee6fe7af69046915f048925f62 Reviewed-by: Mikko Gronoff --- classes/srcrev-update.bbclass | 2 +- conf/layer.conf | 3 +++ recipes-qt/qt6/qt6-git.inc | 2 ++ recipes-qt/qt6/qt6.inc | 2 -- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/classes/srcrev-update.bbclass b/classes/srcrev-update.bbclass index 10dbfa6..8470a04 100644 --- a/classes/srcrev-update.bbclass +++ b/classes/srcrev-update.bbclass @@ -2,7 +2,7 @@ python do_srcrev_update() { import subprocess recipe = d.getVar('FILE') - srcrev_file = os.path.join(os.path.dirname(recipe), 'qt6-git.inc') + srcrev_file = os.path.join(d.getVar('QT6BASE'), 'recipes-qt/qt6/qt6-git.inc') module = d.getVar('QT_MODULE') diff --git a/conf/layer.conf b/conf/layer.conf index b5446f3..fcaa694 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -41,6 +41,9 @@ LICENSE_PATH += "${LAYERDIR}/licenses" IMAGE_FEATURES[validitems] += "qtcreator-debug" +# Set a variable to get to the top of the metadata location +QT6BASE := "${LAYERDIR}" + QT_GIT_PROJECT ?= "qt" QT_GIT ?= "git://code.qt.io" QT_GIT_PROTOCOL ?= "git" diff --git a/recipes-qt/qt6/qt6-git.inc b/recipes-qt/qt6/qt6-git.inc index 4a10bda..9562805 100644 --- a/recipes-qt/qt6/qt6-git.inc +++ b/recipes-qt/qt6/qt6-git.inc @@ -1,6 +1,8 @@ DESCRIPTION ?= "Qt is a cross-platform application development framework for desktop, embedded and mobile." HOMEPAGE ?= "https://www.qt.io" +inherit srcrev-update + QT_MODULE ?= "${BPN}" QT_MODULE_BRANCH ?= "dev" QT_MODULE_BRANCH_PARAM ?= "branch=${QT_MODULE_BRANCH};nobranch=1" diff --git a/recipes-qt/qt6/qt6.inc b/recipes-qt/qt6/qt6.inc index 020a351..c71172a 100644 --- a/recipes-qt/qt6/qt6.inc +++ b/recipes-qt/qt6/qt6.inc @@ -1,5 +1,3 @@ -inherit srcrev-update - include recipes-qt/qt6/qt6-ptest.inc PACKAGECONFIG[examples] = "-DQT_BUILD_EXAMPLES=ON,-DQT_BUILD_EXAMPLES=OFF,"