Bug 846

Summary: Bitbake: provide more information for COMMERCIAL_LICENSE recipes
Product: [Build System, Metadata & Runtime] BitBake Reporter: Ke Yu <ke.yu>
Component: bitbakeAssignee: Paul Eggleton <bluelightning>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Low CC: bluelightning, poky.bs.watcher, poky.watcher, sgw
Version: 1.0   
Target Milestone: 1.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Ke Yu 2011-03-10 18:03:47 UTC
When user bitbake recipe under COMMERCIAL_LICENSE, bitbake simply output 
""ERROR: Nothing PROVIDES 'xxxxx'". this is not that helpful to user.

it would be better that bitbake output info like "xxxxxx is disabled due to COMMERCIAL_LICENSE"

Reproduce step:

# bitbake lame

ERROR: Nothing PROVIDES 'lame'
ERROR: Command execution failed: Traceback (most recent call last):
  File "/home/kyu3/src/poky/bitbake/lib/bb/command.py", line 102, in runAsyncCommand
    commandmethod(self.cmds_async, self, options)
  File "/home/kyu3/src/poky/bitbake/lib/bb/command.py", line 200, in buildTargets
    command.cooker.buildTargets(pkgs_to_build, task)
  File "/home/kyu3/src/poky/bitbake/lib/bb/cooker.py", line 824, in buildTargets
    taskdata.add_provider(localdata, self.status, k)
  File "/home/kyu3/src/poky/bitbake/lib/bb/taskdata.py", line 353, in add_provider
    self.add_provider_internal(cfgData, dataCache, item)
  File "/home/kyu3/src/poky/bitbake/lib/bb/taskdata.py", line 373, in add_provider_internal
    raise bb.providers.NoProvider(item)
NoProvider: lame
Comment 1 Paul Eggleton 2011-07-28 08:35:39 UTC
We now output the following:

------- snip --------
ERROR: Nothing PROVIDES 'lame'
ERROR: lame was skipped: because it requires commercial license to ship product
ERROR: Command execution failed: Traceback (most recent call last):
  File "/home/paul/poky/poky/bitbake/lib/bb/command.py", line 102, in runAsyncCommand
    commandmethod(self.cmds_async, self, options)
  File "/home/paul/poky/poky/bitbake/lib/bb/command.py", line 200, in buildTargets
    command.cooker.buildTargets(pkgs_to_build, task)
  File "/home/paul/poky/poky/bitbake/lib/bb/cooker.py", line 1069, in buildTargets
    taskdata.add_provider(localdata, self.status, k)
  File "/home/paul/poky/poky/bitbake/lib/bb/taskdata.py", line 371, in add_provider
    self.add_provider_internal(cfgData, dataCache, item)
  File "/home/paul/poky/poky/bitbake/lib/bb/taskdata.py", line 391, in add_provider_internal
    raise bb.providers.NoProvider(item)
NoProvider: lame
------- snip --------

Is this enough or do we need to alter the reason message? (The backtrace is a separate issue)
Comment 2 Paul Eggleton 2011-08-17 16:38:10 UTC
Any answer for the above comment?
Comment 3 Ke Yu 2011-08-17 17:38:14 UTC
yes, i think it is enough, as it show the reason of commercial license. it would even better if we show "COMMERCIAL_LICENSE" keyword in the message, so that user can grep it and know where to fix it.
Comment 4 Paul Eggleton 2011-08-25 03:05:26 UTC
Reason now displayed as of http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=daed107ce188c6ae53a3d612de58885f23b7257e

Extended the reason to mention COMMERCIAL_LICENSE explicitly in http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=5f6dcb2bc2c5cb157e95e97a6fc7c5197a96419a

Marking as resolved.