[poky] [PATCH 6/7] bb: replace bb.fetch referrence with bb.fetcher instance
Yu Ke
ke.yu at intel.com
Fri Jan 7 23:15:12 PST 2011
bb.fetcher.instance is a wraper for bb.fetch/bb.fetch2, which
allow easy switch between bb.fetch and bb.fetch2. so replace
all the bb.fetch referrence with bb.fetcher.instance
Signed-off-by: Yu Ke <ke.yu at intel.com>
---
bitbake/lib/bb/command.py | 3 ++-
bitbake/lib/bb/cooker.py | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index b880892..28bccd0 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -31,6 +31,7 @@ Commands are queued in a CommandQueue
import bb.event
import bb.cooker
import bb.data
+import bb.fetcher
async_cmds = {}
sync_cmds = {}
@@ -264,7 +265,7 @@ class CommandsAsync:
"""
Parse the .bb files
"""
- if bb.fetch.fetcher_compare_revisions(command.cooker.configuration.data):
+ if bb.fetcher.instance.fetcher_compare_revisions(command.cooker.configuration.data):
command.finishAsyncCommand(code=1)
else:
command.finishAsyncCommand()
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 77544cd..f6235c3 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -34,7 +34,7 @@ import threading
from cStringIO import StringIO
from contextlib import closing
import bb
-from bb import utils, data, parse, event, cache, providers, taskdata, command, runqueue
+from bb import utils, data, parse, event, cache, providers, taskdata, command, runqueue, fetcher
logger = logging.getLogger("BitBake")
collectlog = logging.getLogger("BitBake.Collection")
@@ -524,7 +524,7 @@ class BBCooker:
bb.event.register(var, bb.data.getVar(var, self.configuration.data))
if bb.data.getVar("BB_WORKERCONTEXT", self.configuration.data) is None:
- bb.fetch.fetcher_init(self.configuration.data)
+ bb.fetcher.instance.fetcher_init(self.configuration.data)
bb.codeparser.parser_cache_init(self.configuration.data)
bb.parse.init_parser(data)
bb.event.fire(bb.event.ConfigParsed(), self.configuration.data)
--
1.7.0.4
More information about the poky
mailing list