]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
devtool: fix upgrade for recipes with git submodules
authorTobias Pistora <pistora.tobias@gmail.com>
Wed, 13 Aug 2025 09:20:41 +0000 (11:20 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Aug 2025 09:14:31 +0000 (10:14 +0100)
Fixes [YOCTO #15943]

Fixes invalid path argument while calling "git rev-list" from submodule folders.
Replaced the local __run() wrapper function with _run() at "git rev-list" command calls.

Signed-off-by: Tobias Pistora <pistora.tobias@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/upgrade.py

index d9aca6e2dbdfcd55b5ffcc3171a27bf47f6eff88..dda0a5809805ce69dec8f1815941bb84fa8cd5d1 100644 (file)
@@ -280,7 +280,7 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee
             # note is still attached to the old commit. Avoid this by making
             # sure all old devtool related commits have a note attached to them
             # (this assumes git config notes.rewriteMode is set to ignore).
-            (stdout, _) = __run('git rev-list devtool-base..%s' % target_branch)
+            (stdout, _) = _run('git rev-list devtool-base..%s' % target_branch, cwd=path)
             for rev in stdout.splitlines():
                 if not oe.patch.GitApplyTree.getNotes(path, rev):
                     oe.patch.GitApplyTree.addNote(path, rev, "dummy")
@@ -298,7 +298,7 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee
                         logger.warning('Command \'%s\' failed:\n%s' % (e.command, e.stdout))
 
             # Remove any dummy notes added above.
-            (stdout, _) = __run('git rev-list devtool-base..%s' % target_branch)
+            (stdout, _) = _run('git rev-list devtool-base..%s' % target_branch, cwd=path)
             for rev in stdout.splitlines():
                 oe.patch.GitApplyTree.removeNote(path, rev, "dummy")