summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-03-14 08:59:03 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-20 23:12:25 +0000
commit600b7007f6240c8dc26a40c3bd3e40ef16d0d3c0 (patch)
tree71a02690c35d6fc7dee69f18c88b7f4dbb53f2b8 /scripts
parent8debfea81e69d038bd2d56314b272cb74f5582ed (diff)
downloadpoky-600b7007f6240c8dc26a40c3bd3e40ef16d0d3c0.tar.gz
recipetool: create: don't create extra files directory unconditionally
The extra directory next to the recipe should only be created if there are files to put into it; currently only the npm plugin does this. I didn't notice the issue earlier because the test was actually able to succeed under these circumstances if the recipe file came first in the directory listing, which was a fault in my original oe-selftest test; apparently on some YP autobuilder machines the order came out reversed. With this change we can put the oe-selftest test that highlighted the issue back to the way it was, with an extra check to reinforce that only a single file should be created. (From OE-Core rev: b8b778345eb0997c2cd952a1f61fdd2050b6b894) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/recipetool/create.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 1649e406e9..bb9fb9b049 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -604,13 +604,14 @@ def create_recipe(args):
604 sys.exit(1) 604 sys.exit(1)
605 605
606 # Move any extra files the plugins created to a directory next to the recipe 606 # Move any extra files the plugins created to a directory next to the recipe
607 if outfile == '-': 607 if extrafiles:
608 extraoutdir = pn 608 if outfile == '-':
609 else: 609 extraoutdir = pn
610 extraoutdir = os.path.join(os.path.dirname(outfile), pn) 610 else:
611 bb.utils.mkdirhier(extraoutdir) 611 extraoutdir = os.path.join(os.path.dirname(outfile), pn)
612 for destfn, extrafile in extrafiles.iteritems(): 612 bb.utils.mkdirhier(extraoutdir)
613 shutil.move(extrafile, os.path.join(extraoutdir, destfn)) 613 for destfn, extrafile in extrafiles.iteritems():
614 shutil.move(extrafile, os.path.join(extraoutdir, destfn))
614 615
615 lines = lines_before 616 lines = lines_before
616 lines_before = [] 617 lines_before = []