* [PATCH 1/2] Remove the duplicated assignments of self.configuration.cmd
2011-11-30 9:23 [PATCH 0/2] Remove a few unwanted lines Robert Yang
@ 2011-11-30 9:23 ` Robert Yang
2011-11-30 9:23 ` [PATCH 2/2] Remove the async_cmds and sync_cmds from command.py Robert Yang
2011-12-05 16:17 ` [PATCH 0/2] Remove a few unwanted lines Richard Purdie
2 siblings, 0 replies; 4+ messages in thread
From: Robert Yang @ 2011-11-30 9:23 UTC (permalink / raw)
To: bitbake-devel
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]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
bitbake/lib/bb/cooker.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 5bbabfc..212c434 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -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")
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] Remove the async_cmds and sync_cmds from command.py
2011-11-30 9:23 [PATCH 0/2] Remove a few unwanted lines Robert Yang
2011-11-30 9:23 ` [PATCH 1/2] Remove the duplicated assignments of self.configuration.cmd Robert Yang
@ 2011-11-30 9:23 ` Robert Yang
2011-12-05 16:17 ` [PATCH 0/2] Remove a few unwanted lines Richard Purdie
2 siblings, 0 replies; 4+ messages in thread
From: Robert Yang @ 2011-11-30 9:23 UTC (permalink / raw)
To: bitbake-devel
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]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
bitbake/lib/bb/command.py | 14 --------------
1 files changed, 0 insertions(+), 14 deletions(-)
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index 1808f0c..83907f6 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -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)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] Remove a few unwanted lines
2011-11-30 9:23 [PATCH 0/2] Remove a few unwanted lines Robert Yang
2011-11-30 9:23 ` [PATCH 1/2] Remove the duplicated assignments of self.configuration.cmd Robert Yang
2011-11-30 9:23 ` [PATCH 2/2] Remove the async_cmds and sync_cmds from command.py Robert Yang
@ 2011-12-05 16:17 ` Richard Purdie
2 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2011-12-05 16:17 UTC (permalink / raw)
To: Robert Yang; +Cc: bitbake-devel
On Wed, 2011-11-30 at 17:23 +0800, Robert Yang wrote:
> 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
This was some corruption in the Poky repository, I've merged it there,
thanks.
> Remove the async_cmds and sync_cmds from command.py
and I merged this to master, thanks.
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread