diff options
author | 2017-09-29 15:26:22 +1300 | |
---|---|---|
committer | 2017-11-10 14:44:31 +0000 | |
commit | 30d2ea67b2c4727e23d06a35745b1afa64b130cc (patch) | |
tree | ebc2d3b6578925fd74bfb224c8eb5d73e9d11e92 /scripts/devtool | |
parent | 8b184f6c874b60324ee107af53853687173d3434 (diff) | |
download | openembedded-core-contrib-30d2ea67b2c4727e23d06a35745b1afa64b130cc.tar.gz |
devtool: fix handling of oe-local-files when source is in a subdirectory
If S points to a subdirectory of the source rather than the "base" of
the source tree then we weren't handling the oe-local-files directory
properly - it got extracted to the base of the tree but devtool
update-recipe and devtool finish assumed it would be under S which would
be the subdirectory, thus it would be missing and devtool would assume
the files had been deleted and remove them from the recipe. Record the
base of the source tree in the bbappend and read it into the in-memory
workspace so we can use that to find out where oe-local-files should be
found.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/devtool')
-rwxr-xr-x | scripts/devtool | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/scripts/devtool b/scripts/devtool index 5292f187e5..87bb5c8323 100755 --- a/scripts/devtool +++ b/scripts/devtool @@ -113,6 +113,7 @@ def read_workspace(): externalsrc_re = re.compile(r'^EXTERNALSRC(_pn-([^ =]+))? *= *"([^"]*)"$') for fn in glob.glob(os.path.join(config.workspace_path, 'appends', '*.bbappend')): with open(fn, 'r') as f: + pnvalues = {} for line in f: res = externalsrc_re.match(line.rstrip()) if res: @@ -125,10 +126,16 @@ def read_workspace(): bbfile)) if recipefile: recipefile = recipefile[0] - workspace[pn] = {'srctree': res.group(3), - 'bbappend': fn, - 'recipefile': recipefile} - logger.debug('Found recipe %s' % workspace[pn]) + pnvalues['srctree'] = res.group(3) + pnvalues['bbappend'] = fn + pnvalues['recipefile'] = recipefile + elif line.startswith('# srctreebase: '): + pnvalues['srctreebase'] = line.split(':', 1)[1].strip() + if pnvalues: + if not pnvalues.get('srctreebase', None): + pnvalues['srctreebase'] = pnvalues['srctree'] + logger.debug('Found recipe %s' % pnvalues) + workspace[pn] = pnvalues def create_workspace(args, config, basepath, workspace): if args.layerpath: |