Bug 1791

Summary: Remove a few unwanted lines
Product: [Build System, Metadata & Runtime] BitBake Reporter: Robert Yang <liezhi.yang>
Component: bitbakeAssignee: Robert Yang <liezhi.yang>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: Low CC: poky.bs.watcher, poky.watcher, richard.purdie, sgw
Version: 1.2   
Target Milestone: 1.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Robert Yang 2011-11-29 18:07:43 UTC
There seems a few lines are unwanted.

In bitbake/lib/bb/cooker.py, we have the followings in both BBCooker::__init__ and
BBCooker::loadConfigurationData:

if not self.configuration.cmd:
    self.configuration.cmd = self.configuration.data.getVar("BB_DEFAULT_TASK", True) or "build"

The __init__ will invoke the loadConfigurationData, so we can remove the one in the __init__.

In bitbake/lib/bb/command.py, we have the following lines:

for attr in CommandsSync.__dict__:
    command = attr[:].lower()
    method = getattr(CommandsSync, attr)
    sync_cmds[command] = (method) 

for attr in CommandsAsync.__dict__:
    command = attr[:].lower()
    method = getattr(CommandsAsync, attr)
    async_cmds[command] = (method) 

The sync_cmds and async_cmds are defined as global dictionaries, but it seems that we've never used them, it seems that they have been replaced by the self.cmds_sync and  self.cmds_async, so I think that we can remove them.
Comment 1 Robert Yang 2011-11-29 18:10:54 UTC
Add Richard to the CC list.
Comment 2 Robert Yang 2011-12-06 23:51:39 UTC
merged to master