Remove a few unwanted lines
cover Remove a few unwanted lines
Remove a few unwanted lines, and the following test is OK:
$ bitbake core-image-sato
// Robert
The following changes since commit cf02474bda67f4f1043b2e95e1b371b2354585a7:
qt-mobility: Add missing patch (2011-11-29 14:36:18 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/remove_unwanted
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/remove_unwanted
Robert Yang (2):
Remove the duplicated assignments of self.configuration.cmd Remove the async_cmds and sync_cmds from command.py
bitbake/lib/bb/command.py | 14 -------------- bitbake/lib/bb/cooker.py | 3 --- 2 files changed, 0 insertions(+), 17 deletions(-)
Signature · 1 line
1.7.4.1
PATCH 1/2 Remove the duplicated assignments of self.configuration.cmd
The assignments of self.configuration.cmd in BBCooker seems duplicated, 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__ invokes the loadConfigurationData, and it would make sure that self.configuration.cmd has been assigned a proper value, so we can remove the one in __init__.
[YOCTO #1791]
--- bitbake/lib/bb/cooker.py | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
bitbake/lib/bb/cooker.py +0 -3
@@ -135,9 +135,6 @@ class BBCooker: self.configuration.data = None self.loadConfigurationData() - if not self.configuration.cmd: - self.configuration.cmd = self.configuration.data.getVar("BB_DEFAULT_TASK", True) or "build" - # Take a lock so only one copy of bitbake can run against a given build # directory at a time lockfile = self.configuration.data.expand("${TOPDIR}/bitbake.lock")
Signature · 1 line
1.7.4.1
PATCH 2/2 Remove the async_cmds and sync_cmds from command.py
In reply to Robert YangIn bitbake/lib/bb/command.py::Command::__init__, 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 (I did a "grep -r async_cmds bitbake/", , there is no result except the ones that I have removed), and I can't find the history of it from "git log -p", I guess that they have been replaced by the self.cmds_sync and self.cmds_async.
[YOCTO #1791]
--- bitbake/lib/bb/command.py | 14 -------------- 1 files changed, 0 insertions(+), 14 deletions(-)
bitbake/lib/bb/command.py +0 -14
@@ -31,10 +31,6 @@ Commands are queued in a CommandQueue import bb.event import bb.cooker -async_cmds = {} -sync_cmds = {} - - class CommandCompleted(bb.event.Event): pass
@@ -60,16 +56,6 @@ class Command: # FIXME Add lock for this self.currentAsyncCommand = None - 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) - def runCommand(self, commandline): try: command = commandline.pop(0)
Signature · 1 line
1.7.4.1
Quoted 8 lines · Robert Yang
Remove a few unwanted lines, and the following test is OK:
$ bitbake core-image-sato// Robert
The following changes since commit
cf02474bda67f4f1043b2e95e1b371b2354585a7:
Quoted 8 lines
qt-mobility: Add missing patch (2011-11-29 14:36:18 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contribrobert/remove_unwanted
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/remove_unwantedRobert Yang (2):
Remove the duplicated assignments of self.configuration.cmd
This was some corruption in the Poky repository, I've merged it there, thanks.
Quoted 1 line
Remove the
async_cmdsandsync_cmdsfromcommand.py
and I merged this to master, thanks.
Richard