[oe-commits] [openembedded-core] 05/38: devtool: Compare abspath of both B and S

git at git.openembedded.org git at git.openembedded.org
Sat Jun 3 22:46:57 UTC 2017


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

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

commit 061f2aab40fecbfe0dcb928baa95d6b3a6b45eed
Author: Ola x Nilsson <ola.x.nilsson at axis.com>
AuthorDate: Tue May 30 12:16:31 2017 +0200

    devtool: Compare abspath of both B and S
    
    Either both or none of the paths must be passed through
    os.path.abspath or things like 'A//B', 'A/./B/', and 'A/B/' in S will
    cause unintentional mismatches even when B = "${S}".
    
    Using os.path.abspath for both seems more likely to be correct as that
    will also handle the case where ${B} != ${S} but the abspaths are
    equal.
    
    Signed-off-by: Ola x Nilsson <olani at axis.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 scripts/lib/devtool/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
index d646b0c..29c4c05 100644
--- a/scripts/lib/devtool/__init__.py
+++ b/scripts/lib/devtool/__init__.py
@@ -191,7 +191,7 @@ def use_external_build(same_dir, no_same_dir, d):
         logger.info('Using source tree as build directory since --same-dir specified')
     elif bb.data.inherits_class('autotools-brokensep', d):
         logger.info('Using source tree as build directory since recipe inherits autotools-brokensep')
-    elif d.getVar('B') == os.path.abspath(d.getVar('S')):
+    elif os.path.abspath(d.getVar('B')) == os.path.abspath(d.getVar('S')):
         logger.info('Using source tree as build directory since that would be the default for this recipe')
     else:
         b_is_s = False

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


More information about the Openembedded-commits mailing list