diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-03-14 08:59:03 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-20 07:44:01 +0000 |
commit | b8b778345eb0997c2cd952a1f61fdd2050b6b894 (patch) | |
tree | 95698a0f34ba7c5c9a45187a91cdd69146bcaf5a /scripts/lib | |
parent | 300f858ba07c938427ccd05a3d7220027a03d461 (diff) | |
download | openembedded-core-b8b778345eb0997c2cd952a1f61fdd2050b6b894.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.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/recipetool/create.py | 15 |
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): sys.exit(1) # Move any extra files the plugins created to a directory next to the recipe - if outfile == '-': - extraoutdir = pn - else: - extraoutdir = os.path.join(os.path.dirname(outfile), pn) - bb.utils.mkdirhier(extraoutdir) - for destfn, extrafile in extrafiles.iteritems(): - shutil.move(extrafile, os.path.join(extraoutdir, destfn)) + if extrafiles: + if outfile == '-': + extraoutdir = pn + else: + extraoutdir = os.path.join(os.path.dirname(outfile), pn) + bb.utils.mkdirhier(extraoutdir) + for destfn, extrafile in extrafiles.iteritems(): + shutil.move(extrafile, os.path.join(extraoutdir, destfn)) lines = lines_before lines_before = [] |