mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
bitbake: toaster: fix for import build directory with var refs in BBLAYERS
Update importing a build directory to support where bblayers.conf
sets BBLAYERS to a value that includes a variable reference e.g.:
BBLAYERS = "${TOPDIR}/../meta \
${TOPDIR}/../meta-selftest"
[YOCTO #13707]
(Bitbake rev: 5bd29d448a31c132afd6fc0127029e246759b87b)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4f959dff76
commit
abee806f11
@@ -114,6 +114,15 @@ class Command(BaseCommand):
|
||||
help='command (configure,reconfigure,import)',
|
||||
)
|
||||
|
||||
def get_var(self, varname):
|
||||
value = self.vars.get(varname, '')
|
||||
if value:
|
||||
varrefs = re.findall('\${([^}]*)}', value)
|
||||
for ref in varrefs:
|
||||
if ref in self.vars:
|
||||
value = value.replace('${%s}' % ref, self.vars[ref])
|
||||
return value
|
||||
|
||||
# Extract the bb variables from a conf file
|
||||
def scan_conf(self,fn):
|
||||
vars = self.vars
|
||||
@@ -241,7 +250,7 @@ class Command(BaseCommand):
|
||||
# Apply table of all layer versions
|
||||
def extract_bblayers(self):
|
||||
# set up the constants
|
||||
bblayer_str = self.vars['BBLAYERS']
|
||||
bblayer_str = self.get_var('BBLAYERS')
|
||||
TOASTER_DIR = os.environ.get('TOASTER_DIR')
|
||||
INSTALL_CLONE_PREFIX = os.path.dirname(TOASTER_DIR) + "/"
|
||||
TOASTER_CLONE_PREFIX = TOASTER_DIR + "/_toaster_clones/"
|
||||
@@ -421,6 +430,7 @@ class Command(BaseCommand):
|
||||
|
||||
# Scan the project's conf files (if any)
|
||||
def scan_conf_variables(self,project_path):
|
||||
self.vars['TOPDIR'] = project_path
|
||||
# scan the project's settings, add any new layers or variables
|
||||
if os.path.isfile("%s/conf/local.conf" % project_path):
|
||||
self.scan_conf("%s/conf/local.conf" % project_path)
|
||||
|
||||
Reference in New Issue
Block a user