]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
devtool: tag all submodules
authorJulien Stephan <jstephan@baylibre.com>
Wed, 22 Nov 2023 11:08:15 +0000 (12:08 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Dec 2023 11:48:13 +0000 (11:48 +0000)
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 <jstephan@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/devtool-source.bbclass
scripts/lib/devtool/__init__.py

index a02b1e9b0ec90441479b2039e1ee0895c1166070..4158c20c7e830f4f0652255e6a5cac4e33900494 100644 (file)
@@ -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() {
index 702db669de32484ed879c83d82dcedbe6e196535..e9e88a55336da34c01fd0836db9685643b584398 100644 (file)
@@ -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.