diff options
author | Ross Burton <ross.burton@intel.com> | 2018-04-25 14:57:29 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-05-11 07:49:31 +0100 |
commit | 06aaafd14f3c8e27faeea0a514f80e1ff5eb4deb (patch) | |
tree | e0a85acea9af8cce860e0500b12f0766e28e0016 | |
parent | e1672e36a653a1d0efb0999c60bf3c56c1983c02 (diff) | |
download | openembedded-core-06aaafd14f3c8e27faeea0a514f80e1ff5eb4deb.tar.gz openembedded-core-06aaafd14f3c8e27faeea0a514f80e1ff5eb4deb.tar.bz2 openembedded-core-06aaafd14f3c8e27faeea0a514f80e1ff5eb4deb.zip |
base: improve do_unpack[cleandirs] logic
If a recipe sets S to ${WORKDIR}/ then the S != WORKDIR test doesn't work as
expected. Use os.path.normpath() to normalise the paths so string comparison
works.
Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r-- | meta/classes/base.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index bb1f4b7533..d5798f9c48 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -152,7 +152,7 @@ python base_do_fetch() { addtask unpack after do_fetch do_unpack[dirs] = "${WORKDIR}" -do_unpack[cleandirs] = "${@d.getVar('S') if d.getVar('S') != d.getVar('WORKDIR') else os.path.join('${S}', 'patches')}" +do_unpack[cleandirs] = "${@d.getVar('S') if os.path.normpath(d.getVar('S')) != os.path.normpath(d.getVar('WORKDIR')) else os.path.join('${S}', 'patches')}" python base_do_unpack() { src_uri = (d.getVar('SRC_URI') or "").split() |