diff options
author | grygorii tertychnyi <gtertych@cisco.com> | 2019-11-01 09:10:43 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-14 13:20:59 +0000 |
commit | 6961d96cba503ee9704a785ed28412f683425762 (patch) | |
tree | fbbfaeedf0336308d48fb68025cc9c5eea3aa5d7 /meta | |
parent | 3aed62d68741101ff5ac0a1276cc789d224bdfdb (diff) | |
download | poky-6961d96cba503ee9704a785ed28412f683425762.tar.gz |
archiver: avoid empty incfile in ar_recipe
do_ar_recipe fails on perf recipe on line:
include ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'perf-perl.inc', '', d)}
1. "${...}" part expands into empty string
2. bb.utils.which() takes empty string and returns first directory name from bbpath
3. shutil.copy() fails on copying directory:
Exception: IsADirectoryError: [Errno 21] Is a directory: ......
Hence, check "incfile" variable on each step.
(From OE-Core rev: 3b393da7d2d15de12e2a8a9c11591078b40b188a)
Signed-off-by: grygorii tertychnyi <gtertych@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/archiver.bbclass | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 093e2d95af..7c46cff91f 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass | |||
@@ -441,9 +441,10 @@ python do_ar_recipe () { | |||
441 | incfile = include_re.match(line).group(1) | 441 | incfile = include_re.match(line).group(1) |
442 | if incfile: | 442 | if incfile: |
443 | incfile = d.expand(incfile) | 443 | incfile = d.expand(incfile) |
444 | if incfile: | ||
444 | incfile = bb.utils.which(bbpath, incfile) | 445 | incfile = bb.utils.which(bbpath, incfile) |
445 | if incfile: | 446 | if incfile: |
446 | shutil.copy(incfile, outdir) | 447 | shutil.copy(incfile, outdir) |
447 | 448 | ||
448 | create_tarball(d, outdir, 'recipe', d.getVar('ARCHIVER_OUTDIR')) | 449 | create_tarball(d, outdir, 'recipe', d.getVar('ARCHIVER_OUTDIR')) |
449 | bb.utils.remove(outdir, recurse=True) | 450 | bb.utils.remove(outdir, recurse=True) |