[oe-commits] [openembedded-core] 20/30: base: improve do_unpack[cleandirs] logic

git at git.openembedded.org git at git.openembedded.org
Wed May 9 22:52:48 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 13059f40ac5c9439cf7b65f932be434e27cda073
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Wed Apr 25 14:57:29 2018 +0100

    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 at intel.com>
---
 meta/classes/base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index bb1f4b7..d5798f9 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()

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list