]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
classes/externalsrc: ensure cleandirs code handles non-absolute paths paule/externalsrc-cleandirs-fixes
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 4 Apr 2018 05:06:29 +0000 (17:06 +1200)
committerPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 4 Apr 2018 10:59:29 +0000 (22:59 +1200)
commitb7c956a8e21f3de178b35c9a70ce60c7900e9bf7
treeede0eb8896d97026be3588dc0efd742949b5452a
parent2a8dd808adeef0efed679f04f2310cb9bf36827e
classes/externalsrc: ensure cleandirs code handles non-absolute paths

It's possible that a trailing or extra slash somewhere in the external
source path could result in the directory not being removed from
cleandirs; it's also possible that a cleandirs entry is somewhere
underneath the source tree and that tree should never have parts of it
deleted by the build system. Use oe.path.is_path_parent() (which makes
paths absolute before checking them) to find out if any path in
cleandirs is anywhere underneath the external source path, and drop it
if it is.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
meta/classes/externalsrc.bbclass