Bug 1791 - Remove a few unwanted lines
Summary: Remove a few unwanted lines
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.2
Hardware: x86 Multiple
: Low minor
Target Milestone: 1.2
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-11-29 18:07 UTC by Robert Yang
Modified: 2011-12-06 23:51 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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