diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2019-08-29 22:43:02 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-09-01 22:33:08 +0100 |
commit | 397d1432cb7518d80bee4fdde88d5dfcdc9df71e (patch) | |
tree | ff08ba83e4ec4de488dc2368fdc67804a6b8cd10 /scripts/lib | |
parent | dfe57de9129e8c63bb0e4adad8eeae02c2aa7fba (diff) | |
download | poky-397d1432cb7518d80bee4fdde88d5dfcdc9df71e.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: 3fdf304e72a1fb5de8bf9bc21e5b598fefb08648)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/devtool/standard.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 96af488798..9eeaefb79c 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
@@ -482,9 +482,9 @@ def symlink_oelocal_files_srctree(rd,srctree): | |||
482 | addfiles.append(os.path.join(relpth, fn)) | 482 | addfiles.append(os.path.join(relpth, fn)) |
483 | if addfiles: | 483 | if addfiles: |
484 | bb.process.run('git add %s' % ' '.join(addfiles), cwd=srctree) | 484 | bb.process.run('git add %s' % ' '.join(addfiles), cwd=srctree) |
485 | useroptions = [] | 485 | useroptions = [] |
486 | oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=rd) | 486 | oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=rd) |
487 | 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) | 487 | bb.process.run('git %s commit -m "Committing local file symlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree) |
488 | 488 | ||
489 | 489 | ||
490 | def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, workspace, fixed_setup, d, tinfoil, no_overrides=False): | 490 | def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, workspace, fixed_setup, d, tinfoil, no_overrides=False): |