diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/utils/commands.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index bc1dbb1a5f..663e4e7f41 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py | |||
@@ -16,6 +16,7 @@ import threading | |||
16 | import logging | 16 | import logging |
17 | from oeqa.utils import CommandError | 17 | from oeqa.utils import CommandError |
18 | from oeqa.utils import ftools | 18 | from oeqa.utils import ftools |
19 | import re | ||
19 | 20 | ||
20 | class Command(object): | 21 | class Command(object): |
21 | def __init__(self, command, bg=False, timeout=None, data=None, **options): | 22 | def __init__(self, command, bg=False, timeout=None, data=None, **options): |
@@ -139,11 +140,11 @@ def get_bb_var(var, target=None, postconfig=None): | |||
139 | bbenv = get_bb_env(target, postconfig=postconfig) | 140 | bbenv = get_bb_env(target, postconfig=postconfig) |
140 | lastline = None | 141 | lastline = None |
141 | for line in bbenv.splitlines(): | 142 | for line in bbenv.splitlines(): |
142 | if line.startswith(var + "=") or line.startswith("export " + var + "="): | 143 | if re.search("^(export )?%s=" % var, line): |
143 | val = line.split('=')[1] | 144 | val = line.split('=')[1] |
144 | val = val.strip('\"') | 145 | val = val.strip('\"') |
145 | break | 146 | break |
146 | elif line.startswith("unset " + var): | 147 | elif re.match("unset %s$" % var, line): |
147 | # Handle [unexport] variables | 148 | # Handle [unexport] variables |
148 | if lastline.startswith('# "'): | 149 | if lastline.startswith('# "'): |
149 | val = lastline.split('\"')[1] | 150 | val = lastline.split('\"')[1] |