Skip to contentSkip to conversation

Remove a few unwanted lines

PATCH In review Robert Yang 2 participants 4 messages Nov 30, 2011 – Dec 5, 2011

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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
index 5bbabfc..212c434 100644
@@ -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
#2 lore raw

PATCH 2/2 Remove the async_cmds and sync_cmds from command.py

In reply to Robert Yang

In 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
index 1808f0c..83907f6 100644
@@ -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
#3 lore raw
In reply to Robert Yang
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-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

This was some corruption in the Poky repository, I've merged it there, thanks.

Quoted 1 line

Remove the async_cmds and sync_cmds from command.py

and I merged this to master, thanks.

Richard