summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-03-09 17:48:54 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-09 17:00:29 +0000
commit309b2e6c571248a3b77c432ed96dfb976cb840bc (patch)
tree394e94cd0e8c02d5ce0709148df88ff3d4c9adc7 /scripts/lib/devtool
parent2279eb2a4cb82dc7033fcca97ecbed3ae09de902 (diff)
downloadpoky-309b2e6c571248a3b77c432ed96dfb976cb840bc.tar.gz
recipetool: create: support creation of additional files by plugins
Allow plugins to create additional files to go alongside the recipe. The plugins don't know what the output filename is going to be, so they need to put the files in a temporary location and add them to an "extrafiles" dict within extravalues where the destination filename is the key and the temporary path is the value. devtool add was also extended to ensure these files get moved in and preserved upon reset if they've been edited by the user. (From OE-Core rev: 334b9451111b7e3efbb43b3a4eecebcab8ec6f0e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool')
-rw-r--r--scripts/lib/devtool/standard.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 5f83a91929..b344001298 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -189,6 +189,9 @@ def add(args, config, basepath, workspace):
189 raise DevtoolError('Couldn\'t find source tree created by recipetool') 189 raise DevtoolError('Couldn\'t find source tree created by recipetool')
190 bb.utils.mkdirhier(recipedir) 190 bb.utils.mkdirhier(recipedir)
191 shutil.move(recipes[0], recipefile) 191 shutil.move(recipes[0], recipefile)
192 # Move any additional files created by recipetool
193 for fn in os.listdir(tempdir):
194 shutil.move(os.path.join(tempdir, fn), recipedir)
192 else: 195 else:
193 raise DevtoolError('Command \'%s\' did not create any recipe file:\n%s' % (e.command, e.stdout)) 196 raise DevtoolError('Command \'%s\' did not create any recipe file:\n%s' % (e.command, e.stdout))
194 attic_recipe = os.path.join(config.workspace_path, 'attic', recipename, os.path.basename(recipefile)) 197 attic_recipe = os.path.join(config.workspace_path, 'attic', recipename, os.path.basename(recipefile))
@@ -199,7 +202,8 @@ def add(args, config, basepath, workspace):
199 shutil.rmtree(tmpsrcdir) 202 shutil.rmtree(tmpsrcdir)
200 shutil.rmtree(tempdir) 203 shutil.rmtree(tempdir)
201 204
202 _add_md5(config, recipename, recipefile) 205 for fn in os.listdir(recipedir):
206 _add_md5(config, recipename, os.path.join(recipedir, fn))
203 207
204 if args.fetch and not args.no_git: 208 if args.fetch and not args.no_git:
205 setup_git_repo(srctree, args.version, 'devtool') 209 setup_git_repo(srctree, args.version, 'devtool')