summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2019-11-05 23:08:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-18 14:42:12 +0000
commit229dfc0d9c8173bc595d0592625cde24252136c8 (patch)
tree729ec239db05d454b86f55372d943e22737f51ac /scripts
parentd16e35442fd4a0fa919b99ebf6b4c7b73337c42b (diff)
downloadpoky-229dfc0d9c8173bc595d0592625cde24252136c8.tar.gz
devtool: Avoid failure for recipes with S == WORKDIR and no local files
When extracting the sources for a recipe that has S == WORKDIR and no local files in the SRC_URI (which, e.g., can happen for a recipe with a URI that has the unpack=false attribute), the extraction fails with the following backtrace: Traceback (most recent call last): File ".../scripts/devtool", line 344, in <module> ret = main() File ".../scripts/devtool", line 331, in main ret = args.func(args, config, basepath, workspace) File ".../poky/scripts/lib/devtool/standard.py", line 762, in modify initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides) File ".../poky/scripts/lib/devtool/standard.py", line 647, in _extract_source bb.process.run('git %s commit -a -m "Committing local file symlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree) File ".../poky/bitbake/lib/bb/process.py", line 178, in run raise ExecutionError(cmd, pipe.returncode, stdout, stderr) bb.process.ExecutionError: Execution of 'git commit -a -m "Committing local file symlinks %% ignore"' failed with exit code 1: On branch devtool nothing to commit, working tree clean This is because no files were found in the oe-local-files directory and consequently no symbolic links were added using `git add`, but the `git commit` command was still executed. (From OE-Core rev: 025091692e73b78c36bd4095288b9f3fc7ee1811) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/standard.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index aca74b1fc6..dcb6bf9540 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -637,9 +637,9 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works
637 addfiles.append(os.path.join(relpth, fn)) 637 addfiles.append(os.path.join(relpth, fn))
638 if addfiles: 638 if addfiles:
639 bb.process.run('git add %s' % ' '.join(addfiles), cwd=srctree) 639 bb.process.run('git add %s' % ' '.join(addfiles), cwd=srctree)
640 useroptions = [] 640 useroptions = []
641 oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=d) 641 oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=d)
642 bb.process.run('git %s commit -a -m "Committing local file symlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree) 642 bb.process.run('git %s commit -m "Committing local file symlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree)
643 643
644 if is_kernel_yocto: 644 if is_kernel_yocto:
645 logger.info('Copying kernel config to srctree') 645 logger.info('Copying kernel config to srctree')