mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
Remove the async_cmds and sync_cmds from command.py
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 rev: 24e99460800856035bb54a84c7aa33b3517436e9)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
897d1cd951
commit
2639c37b25
@@ -31,10 +31,6 @@ Commands are queued in a CommandQueue
|
|||||||
import bb.event
|
import bb.event
|
||||||
import bb.cooker
|
import bb.cooker
|
||||||
|
|
||||||
async_cmds = {}
|
|
||||||
sync_cmds = {}
|
|
||||||
|
|
||||||
|
|
||||||
class CommandCompleted(bb.event.Event):
|
class CommandCompleted(bb.event.Event):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -60,16 +56,6 @@ class Command:
|
|||||||
# FIXME Add lock for this
|
# FIXME Add lock for this
|
||||||
self.currentAsyncCommand = None
|
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):
|
def runCommand(self, commandline):
|
||||||
try:
|
try:
|
||||||
command = commandline.pop(0)
|
command = commandline.pop(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user