summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/recipetool.py6
-rw-r--r--scripts/lib/recipetool/create.py15
2 files changed, 12 insertions, 9 deletions
diff --git a/meta/lib/oeqa/selftest/recipetool.py b/meta/lib/oeqa/selftest/recipetool.py
index 72ee110876..a04ee87db2 100644
--- a/meta/lib/oeqa/selftest/recipetool.py
+++ b/meta/lib/oeqa/selftest/recipetool.py
@@ -410,9 +410,11 @@ class RecipetoolTests(RecipetoolBase):
410 srcuri = 'http://www.dest-unreach.org/socat/download/socat-%s.tar.bz2' % pv 410 srcuri = 'http://www.dest-unreach.org/socat/download/socat-%s.tar.bz2' % pv
411 result = runCmd('recipetool create %s -o %s' % (srcuri, temprecipe)) 411 result = runCmd('recipetool create %s -o %s' % (srcuri, temprecipe))
412 dirlist = os.listdir(temprecipe) 412 dirlist = os.listdir(temprecipe)
413 if len(dirlist) < 1 or not os.path.isfile(os.path.join(temprecipe, 'socat_%s.bb' % pv)): 413 if len(dirlist) > 1:
414 self.fail('recipetool created more than just one file; output:\n%s\ndirlist:\n%s' % (result.output, str(dirlist)))
415 if len(dirlist) < 1 or not os.path.isfile(os.path.join(temprecipe, dirlist[0])):
414 self.fail('recipetool did not create recipe file; output:\n%s\ndirlist:\n%s' % (result.output, str(dirlist))) 416 self.fail('recipetool did not create recipe file; output:\n%s\ndirlist:\n%s' % (result.output, str(dirlist)))
415 self.assertIn('socat_%s.bb' % pv, dirlist, 'Recipe file incorrectly named') 417 self.assertEqual(dirlist[0], 'socat_%s.bb' % pv, 'Recipe file incorrectly named')
416 checkvars = {} 418 checkvars = {}
417 checkvars['LICENSE'] = set(['Unknown', 'GPLv2']) 419 checkvars['LICENSE'] = set(['Unknown', 'GPLv2'])
418 checkvars['LIC_FILES_CHKSUM'] = set(['file://COPYING.OpenSSL;md5=5c9bccc77f67a8328ef4ebaf468116f4', 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263']) 420 checkvars['LIC_FILES_CHKSUM'] = set(['file://COPYING.OpenSSL;md5=5c9bccc77f67a8328ef4ebaf468116f4', 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263'])
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 = []