From 4c7b0007327d592b8f5d1f50ebb0325dc483bd87 Mon Sep 17 00:00:00 2001 From: Tobias Pistora Date: Wed, 13 Aug 2025 11:20:41 +0200 Subject: devtool: fix upgrade for recipes with git submodules 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. (From OE-Core rev: c1839a24f08a87984d475d23f37a7c923d424267) Signed-off-by: Tobias Pistora Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- scripts/lib/devtool/upgrade.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/lib/devtool/upgrade.py') diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index d9aca6e2db..dda0a58098 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py @@ -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") -- cgit v1.2.3-54-g00ecf