summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel-devicetree.bbclass
diff options
context:
space:
mode:
authorLuca Ceresoli <luca@lucaceresoli.net>2017-09-29 10:39:24 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-04 17:23:56 +0000
commitda8f32a3bb0eec874c66b5f18c08a5b8f15a94c5 (patch)
tree5b7911d2563e257bc47636d98391a3a980e8a459 /meta/classes/kernel-devicetree.bbclass
parente6fe54ce386e0edb72cbcbdcc4b5cddb151535f2 (diff)
downloadpoky-da8f32a3bb0eec874c66b5f18c08a5b8f15a94c5.tar.gz
externalsrc: fix ExpansionError if the source dir does not exist yet
The externalsrc class code assumes that the source directory (EXTERNALSRC) exists before bitbake is called. Otherwise do_configure will fail obviously since externalsrc does not fetch anything. Commit 3ca6085729d9 ("externalsrc: Handle .git not being a directory") changed this behaviour. Now on a missing EXTERNALSRC directory we get a bb.data_smart.ExpansionError during _parsing_, way before do_configure can be run. This new behaviour creates two problems: * First, there error message is very cryptic (and it's hard to provide a better message since no task is ever run): ERROR: ExpansionError during parsing /<...>/<...>.bb Traceback (most recent call last): bb.data_smart.ExpansionError: Failure expanding variable do_compile[file-checksums], expression was ${@srctree_hash_files(d)} which triggered exception FileNotFoundError: [Errno 2] No such file or directory: '<...>' * Second, this prevents creating a class based on externalsrc that automatically fetches the code in EXTERNALSRC before do_compile runs. Fix both problems by simply calling git with '-C ${EXTERNALSRC}' instead of calling git inside the non-existing directory. This changes from a bb.data_smart.ExpansionError to a subprocess.CalledProcessError, which is in line with what's actually going on: git is telling us it can't find the git dir. Also remove a comment that does not apply anymore. (From OE-Core rev: 390e4cc74ef9b578e1cced21444247d975610154) Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Joshua Watt <jpewhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel-devicetree.bbclass')
0 files changed, 0 insertions, 0 deletions