summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/devtool/standard.py6
-rw-r--r--scripts/lib/recipetool/create.py11
2 files changed, 16 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')
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 1d48e36462..1649e406e9 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -560,6 +560,8 @@ def create_recipe(args):
560 for handler in handlers: 560 for handler in handlers:
561 handler.process(srctree_use, classes, lines_before, lines_after, handled, extravalues) 561 handler.process(srctree_use, classes, lines_before, lines_after, handled, extravalues)
562 562
563 extrafiles = extravalues.pop('extrafiles', {})
564
563 if not realpv: 565 if not realpv:
564 realpv = extravalues.get('PV', None) 566 realpv = extravalues.get('PV', None)
565 if realpv: 567 if realpv:
@@ -601,6 +603,15 @@ def create_recipe(args):
601 logger.error('Output file %s already exists' % outfile) 603 logger.error('Output file %s already exists' % outfile)
602 sys.exit(1) 604 sys.exit(1)
603 605
606 # Move any extra files the plugins created to a directory next to the recipe
607 if outfile == '-':
608 extraoutdir = pn
609 else:
610 extraoutdir = os.path.join(os.path.dirname(outfile), pn)
611 bb.utils.mkdirhier(extraoutdir)
612 for destfn, extrafile in extrafiles.iteritems():
613 shutil.move(extrafile, os.path.join(extraoutdir, destfn))
614
604 lines = lines_before 615 lines = lines_before
605 lines_before = [] 616 lines_before = []
606 skipblank = True 617 skipblank = True