From: Julien Stephan Date: Wed, 22 Nov 2023 11:08:15 +0000 (+0100) Subject: devtool: tag all submodules X-Git-Tag: uninative-4.4~908 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=241da68805d177d4ec4b302c8a997645cc645286;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git devtool: tag all submodules In the case of a repository with submodules, we need to add the "devtool-base" and "devtool-patched" tag on all submodules in order to properly detect the added/removed/modified patches Signed-off-by: Julien Stephan Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- diff --git a/meta/classes/devtool-source.bbclass b/meta/classes/devtool-source.bbclass index a02b1e9b0ec..4158c20c7e8 100644 --- a/meta/classes/devtool-source.bbclass +++ b/meta/classes/devtool-source.bbclass @@ -232,6 +232,9 @@ python devtool_post_patch() { bb.process.run('git rebase devtool-no-overrides', cwd=srcsubdir) bb.process.run('git checkout %s' % devbranch, cwd=srcsubdir) bb.process.run('git tag -f devtool-patched', cwd=srcsubdir) + if os.path.exists(os.path.join(srcsubdir, '.gitmodules')): + bb.process.run('git submodule foreach --recursive "git tag -f devtool-patched"', cwd=srcsubdir) + } python devtool_post_configure() { diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py index 702db669de3..e9e88a55336 100644 --- a/scripts/lib/devtool/__init__.py +++ b/scripts/lib/devtool/__init__.py @@ -233,6 +233,9 @@ def setup_git_repo(repodir, version, devbranch, basetag='devtool-base', d=None): bb.process.run('git checkout -b %s' % devbranch, cwd=repodir) bb.process.run('git tag -f %s' % basetag, cwd=repodir) + if os.path.exists(os.path.join(repodir, '.gitmodules')): + bb.process.run('git submodule foreach --recursive "git tag -f %s"' % basetag, cwd=repodir) + def recipe_to_append(recipefile, config, wildcard=False): """ Convert a recipe file to a bbappend file path within the workspace.