diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-02-26 14:49:54 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-01 22:13:56 +0000 |
commit | 9b49883f2f6325ea8b68cf676f5e2339fa9117e1 (patch) | |
tree | 6ea3e75d1625789eaddedb934a7ab0daf0f463a2 /meta-selftest/recipes-test/images/wic-image-minimal.wks | |
parent | 98aff12d9cd104d39cdff815ee0c5194efa438f6 (diff) | |
download | poky-9b49883f2f6325ea8b68cf676f5e2339fa9117e1.tar.gz |
lib/oe/path: implement is_path_parent()
In a few places we have checks to see path B is the parent of path A, by
adding / to the end of the path B and then seeing if path A starts with
the suffixed path B. Unfortunately there are two potential flaws:
(1) path A needs to be suffixed with / as well or the directory itself
won't match (semantics perhaps, but in a lot of scenarios returning True
is correct); (2) you need to run os.path.abspath() on both paths first
or you will wrongly return False for some relative paths where you
should return True. Let's solve this once and for all by writing a
function that takes care of these and put it in oe.path.
(From OE-Core rev: dd3d4b0367272a5826a9a51afa26f426dd003e5d)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest/recipes-test/images/wic-image-minimal.wks')
0 files changed, 0 insertions, 0 deletions