Bug 11210 - tinfoil: parse_recipe() fails for multiconfig pns
Summary: tinfoil: parse_recipe() fails for multiconfig pns
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.3 M4
Assignee: Juro Bystricky
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-03-22 12:30 UTC by Patrick Ohly
Modified: 2017-04-19 15:49 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Ohly 2017-03-22 12:30:08 UTC
Traceback (most recent call last):
  File "/fast/work/meta-security-tools/scripts/sdl-whitelist-status.py", line 97, in <module>
    tinfoil.parse_recipe('multiconfig:qemuarm:gcc')
  File "/fast/work/bitbake/lib/bb/tinfoil.py", line 350, in parse_recipe
    return self.parse_recipe_file(fn)
  File "/fast/work/bitbake/lib/bb/tinfoil.py", line 373, in parse_recipe_file
    dscon = self.run_command('parseRecipeFile', fn, appends, appendlist)
  File "/fast/work/bitbake/lib/bb/tinfoil.py", line 281, in run_command
    raise TinfoilCommandFailed(result[1])
bb.tinfoil.TinfoilCommandFailed: Traceback (most recent call last):
  File "/fast/work/bitbake/lib/bb/command.py", line 81, in runCommand
    result = command_method(self, commandline)
  File "/fast/work/bitbake/lib/bb/command.py", line 521, in parseRecipeFile
    appendfiles = command.cooker.collection.get_file_appends(fn)
  File "/fast/work/bitbake/lib/bb/cooker.py", line 1961, in get_file_appends
    f = os.path.basename(fn)
  File "/usr/lib/python3.4/posixpath.py", line 139, in basename
    i = p.rfind(sep) + 1
AttributeError: 'NoneType' object has no attribute 'rfind'

'multiconfig:qemuarm:gcc' is a valid pn because of:
$ cat conf/multiconfig/qemuarm.conf 
MACHINE = "qemuarm"
$ grep -e ^BBMULTICONFIG -e ^MACHINE conf/local.conf
MACHINE ?= "intel-corei7-64"
BBMULTICONFIG = "qemuarm"

Looks like fn = self.get_recipe_file(pn) fails to find the file name.

Note that there's also no error handling when passing some entirely invalid pn. tinfoil.parse_recipe('foobar') fails the same way.
Comment 2 Juro Bystricky 2017-04-06 14:45:04 UTC
patch not accepted, back to the drawing board...
Comment 3 Juro Bystricky 2017-04-10 18:11:07 UTC
sent patches updated according to feedback:
http://lists.openembedded.org/pipermail/bitbake-devel/2017-April/008618.html
Comment 4 Ross Burton 2017-04-19 15:49:35 UTC
Merged in Bitbake e9c03fbfd7b057b28645affa263cb4aebfa24b04.