From: Paul Eggleton Date: Fri, 19 Dec 2014 11:41:51 +0000 (+0000) Subject: oeqa/utils: make get_bb_var() more reliable X-Git-Tag: 2015-4~951 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=418cdf1ca37e06165ebaec86a0098d4750208539;p=openembedded-core.git oeqa/utils: make get_bb_var() more reliable * Enable querying exported variables * Use strip() to remove quotes so any internal quotes are not disturbed Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 802bc2f208..d29c1b1a68 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py @@ -138,9 +138,9 @@ def get_bb_var(var, target=None, postconfig=None): val = None bbenv = get_bb_env(target, postconfig=postconfig) for line in bbenv.splitlines(): - if line.startswith(var + "="): + if line.startswith(var + "=") or line.startswith("export " + var + "="): val = line.split('=')[1] - val = val.replace('\"','') + val = val.strip('\"') break return val