summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorYu Ke <ke.yu@intel.com>2011-01-10 18:05:07 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-10 18:05:07 +0000
commitc64b445f38179a117d39319f762f9dc2435da0ea (patch)
tree11d59fd3179d6c62eb80e81afaf343900d94f082 /bitbake
parent6b212ad3c3a848be713d62b942da3a294a26f043 (diff)
downloadpoky-c64b445f38179a117d39319f762f9dc2435da0ea.tar.gz
bb.fetch2: replace bb.fetch with bb.fetch2 in the bb.fetch
bb.fetch2 is copied from bb.fetch, and has many bb.fetch referrence. Fix these referrence with bb.fetch2 referrence Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py22
-rw-r--r--bitbake/lib/bb/fetch2/bzr.py2
-rw-r--r--bitbake/lib/bb/fetch2/cvs.py2
-rw-r--r--bitbake/lib/bb/fetch2/git.py8
-rw-r--r--bitbake/lib/bb/fetch2/hg.py10
-rw-r--r--bitbake/lib/bb/fetch2/local.py2
-rw-r--r--bitbake/lib/bb/fetch2/osc.py8
-rw-r--r--bitbake/lib/bb/fetch2/perforce.py6
-rw-r--r--bitbake/lib/bb/fetch2/repo.py4
-rw-r--r--bitbake/lib/bb/fetch2/ssh.py4
-rw-r--r--bitbake/lib/bb/fetch2/svk.py8
-rw-r--r--bitbake/lib/bb/fetch2/svn.py10
-rw-r--r--bitbake/lib/bb/fetch2/wget.py2
13 files changed, 44 insertions, 44 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index f7153ebce9..dd6f714d71 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -134,9 +134,9 @@ def uri_replace(uri, uri_find, uri_replace, d):
134 result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc]) 134 result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc])
135 if uri_find_decoded.index(i) == 2: 135 if uri_find_decoded.index(i) == 2:
136 if d: 136 if d:
137 localfn = bb.fetch.localpath(uri, d) 137 localfn = bb.fetch2.localpath(uri, d)
138 if localfn: 138 if localfn:
139 result_decoded[loc] = os.path.join(os.path.dirname(result_decoded[loc]), os.path.basename(bb.fetch.localpath(uri, d))) 139 result_decoded[loc] = os.path.join(os.path.dirname(result_decoded[loc]), os.path.basename(bb.fetch2.localpath(uri, d)))
140 else: 140 else:
141 return uri 141 return uri
142 return encodeurl(result_decoded) 142 return encodeurl(result_decoded)
@@ -158,7 +158,7 @@ def fetcher_init(d):
158 elif srcrev_policy == "clear": 158 elif srcrev_policy == "clear":
159 logger.debug(1, "Clearing SRCREV cache due to cache policy of: %s", srcrev_policy) 159 logger.debug(1, "Clearing SRCREV cache due to cache policy of: %s", srcrev_policy)
160 try: 160 try:
161 bb.fetch.saved_headrevs = pd['BB_URI_HEADREVS'].items() 161 bb.fetch2.saved_headrevs = pd['BB_URI_HEADREVS'].items()
162 except: 162 except:
163 pass 163 pass
164 del pd['BB_URI_HEADREVS'] 164 del pd['BB_URI_HEADREVS']
@@ -177,7 +177,7 @@ def fetcher_compare_revisions(d):
177 177
178 pd = persist_data.persist(d) 178 pd = persist_data.persist(d)
179 data = pd['BB_URI_HEADREVS'].items() 179 data = pd['BB_URI_HEADREVS'].items()
180 data2 = bb.fetch.saved_headrevs 180 data2 = bb.fetch2.saved_headrevs
181 181
182 changed = False 182 changed = False
183 for key in data: 183 for key in data:
@@ -378,7 +378,7 @@ def get_srcrev(d):
378 # 378 #
379 # Neater solutions welcome! 379 # Neater solutions welcome!
380 # 380 #
381 if bb.fetch.srcrev_internal_call: 381 if bb.fetch2.srcrev_internal_call:
382 return "SRCREVINACTION" 382 return "SRCREVINACTION"
383 383
384 scms = [] 384 scms = []
@@ -494,7 +494,7 @@ def try_mirrors(d, uri, mirrors, check = False, force = False):
494 if newuri != uri: 494 if newuri != uri:
495 try: 495 try:
496 ud = FetchData(newuri, ld) 496 ud = FetchData(newuri, ld)
497 except bb.fetch.NoMethodError: 497 except bb.fetch2.NoMethodError:
498 logger.debug(1, "No method for %s", uri) 498 logger.debug(1, "No method for %s", uri)
499 continue 499 continue
500 500
@@ -508,9 +508,9 @@ def try_mirrors(d, uri, mirrors, check = False, force = False):
508 else: 508 else:
509 ud.method.go(newuri, ud, ld) 509 ud.method.go(newuri, ud, ld)
510 return ud.localpath 510 return ud.localpath
511 except (bb.fetch.MissingParameterError, 511 except (bb.fetch2.MissingParameterError,
512 bb.fetch.FetchError, 512 bb.fetch2.FetchError,
513 bb.fetch.MD5SumError): 513 bb.fetch2.MD5SumError):
514 import sys 514 import sys
515 (type, value, traceback) = sys.exc_info() 515 (type, value, traceback) = sys.exc_info()
516 logger.debug(2, "Mirror fetch failure: %s", value) 516 logger.debug(2, "Mirror fetch failure: %s", value)
@@ -571,10 +571,10 @@ class FetchData(object):
571 self.localpath = local 571 self.localpath = local
572 if not local: 572 if not local:
573 try: 573 try:
574 bb.fetch.srcrev_internal_call = True 574 bb.fetch2.srcrev_internal_call = True
575 self.localpath = self.method.localpath(self.url, self, d) 575 self.localpath = self.method.localpath(self.url, self, d)
576 finally: 576 finally:
577 bb.fetch.srcrev_internal_call = False 577 bb.fetch2.srcrev_internal_call = False
578 # We have to clear data's internal caches since the cached value of SRCREV is now wrong. 578 # We have to clear data's internal caches since the cached value of SRCREV is now wrong.
579 # Horrible... 579 # Horrible...
580 bb.data.delVar("ISHOULDNEVEREXIST", d) 580 bb.data.delVar("ISHOULDNEVEREXIST", d)
diff --git a/bitbake/lib/bb/fetch2/bzr.py b/bitbake/lib/bb/fetch2/bzr.py
index afaf799900..3d23b4d3cf 100644
--- a/bitbake/lib/bb/fetch2/bzr.py
+++ b/bitbake/lib/bb/fetch2/bzr.py
@@ -28,7 +28,7 @@ import sys
28import logging 28import logging
29import bb 29import bb
30from bb import data 30from bb import data
31from bb.fetch import Fetch, FetchError, runfetchcmd, logger 31from bb.fetch2 import Fetch, FetchError, runfetchcmd, logger
32 32
33class Bzr(Fetch): 33class Bzr(Fetch):
34 def supports(self, url, ud, d): 34 def supports(self, url, ud, d):
diff --git a/bitbake/lib/bb/fetch2/cvs.py b/bitbake/lib/bb/fetch2/cvs.py
index 0edb794b04..1570cab9c3 100644
--- a/bitbake/lib/bb/fetch2/cvs.py
+++ b/bitbake/lib/bb/fetch2/cvs.py
@@ -30,7 +30,7 @@ import os
30import logging 30import logging
31import bb 31import bb
32from bb import data 32from bb import data
33from bb.fetch import Fetch, FetchError, MissingParameterError, logger 33from bb.fetch2 import Fetch, FetchError, MissingParameterError, logger
34 34
35class Cvs(Fetch): 35class Cvs(Fetch):
36 """ 36 """
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index de415ec309..e8ad3b43ca 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -23,9 +23,9 @@ BitBake 'Fetch' git implementation
23import os 23import os
24import bb 24import bb
25from bb import data 25from bb import data
26from bb.fetch import Fetch 26from bb.fetch2 import Fetch
27from bb.fetch import runfetchcmd 27from bb.fetch2 import runfetchcmd
28from bb.fetch import logger 28from bb.fetch2 import logger
29 29
30class Git(Fetch): 30class Git(Fetch):
31 """Class to fetch a module or modules from git repositories""" 31 """Class to fetch a module or modules from git repositories"""
@@ -225,7 +225,7 @@ class Git(Fetch):
225 cmd = "%s ls-remote %s://%s%s%s %s" % (basecmd, ud.proto, username, ud.host, ud.path, ud.branch) 225 cmd = "%s ls-remote %s://%s%s%s %s" % (basecmd, ud.proto, username, ud.host, ud.path, ud.branch)
226 output = runfetchcmd(cmd, d, True) 226 output = runfetchcmd(cmd, d, True)
227 if not output: 227 if not output:
228 raise bb.fetch.FetchError("Fetch command %s gave empty output\n" % (cmd)) 228 raise bb.fetch2.FetchError("Fetch command %s gave empty output\n" % (cmd))
229 return output.split()[0] 229 return output.split()[0]
230 230
231 def _build_revision(self, url, ud, d): 231 def _build_revision(self, url, ud, d):
diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py
index 3c649a6ad0..9e91bec186 100644
--- a/bitbake/lib/bb/fetch2/hg.py
+++ b/bitbake/lib/bb/fetch2/hg.py
@@ -29,11 +29,11 @@ import sys
29import logging 29import logging
30import bb 30import bb
31from bb import data 31from bb import data
32from bb.fetch import Fetch 32from bb.fetch2 import Fetch
33from bb.fetch import FetchError 33from bb.fetch2 import FetchError
34from bb.fetch import MissingParameterError 34from bb.fetch2 import MissingParameterError
35from bb.fetch import runfetchcmd 35from bb.fetch2 import runfetchcmd
36from bb.fetch import logger 36from bb.fetch2 import logger
37 37
38class Hg(Fetch): 38class Hg(Fetch):
39 """Class to fetch from mercurial repositories""" 39 """Class to fetch from mercurial repositories"""
diff --git a/bitbake/lib/bb/fetch2/local.py b/bitbake/lib/bb/fetch2/local.py
index 6aa9e45768..bcb30dfc95 100644
--- a/bitbake/lib/bb/fetch2/local.py
+++ b/bitbake/lib/bb/fetch2/local.py
@@ -29,7 +29,7 @@ import os
29import bb 29import bb
30import bb.utils 30import bb.utils
31from bb import data 31from bb import data
32from bb.fetch import Fetch 32from bb.fetch2 import Fetch
33 33
34class Local(Fetch): 34class Local(Fetch):
35 def supports(self, url, urldata, d): 35 def supports(self, url, urldata, d):
diff --git a/bitbake/lib/bb/fetch2/osc.py b/bitbake/lib/bb/fetch2/osc.py
index 26820967a3..06ac5a9ce3 100644
--- a/bitbake/lib/bb/fetch2/osc.py
+++ b/bitbake/lib/bb/fetch2/osc.py
@@ -11,10 +11,10 @@ import sys
11import logging 11import logging
12import bb 12import bb
13from bb import data 13from bb import data
14from bb.fetch import Fetch 14from bb.fetch2 import Fetch
15from bb.fetch import FetchError 15from bb.fetch2 import FetchError
16from bb.fetch import MissingParameterError 16from bb.fetch2 import MissingParameterError
17from bb.fetch import runfetchcmd 17from bb.fetch2 import runfetchcmd
18 18
19class Osc(Fetch): 19class Osc(Fetch):
20 """Class to fetch a module or modules from Opensuse build server 20 """Class to fetch a module or modules from Opensuse build server
diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py
index 222ed7eaaa..18b27812e0 100644
--- a/bitbake/lib/bb/fetch2/perforce.py
+++ b/bitbake/lib/bb/fetch2/perforce.py
@@ -30,9 +30,9 @@ import os
30import logging 30import logging
31import bb 31import bb
32from bb import data 32from bb import data
33from bb.fetch import Fetch 33from bb.fetch2 import Fetch
34from bb.fetch import FetchError 34from bb.fetch2 import FetchError
35from bb.fetch import logger 35from bb.fetch2 import logger
36 36
37class Perforce(Fetch): 37class Perforce(Fetch):
38 def supports(self, url, ud, d): 38 def supports(self, url, ud, d):
diff --git a/bitbake/lib/bb/fetch2/repo.py b/bitbake/lib/bb/fetch2/repo.py
index 03642e7a0d..3330957ce3 100644
--- a/bitbake/lib/bb/fetch2/repo.py
+++ b/bitbake/lib/bb/fetch2/repo.py
@@ -26,8 +26,8 @@ BitBake "Fetch" repo (git) implementation
26import os 26import os
27import bb 27import bb
28from bb import data 28from bb import data
29from bb.fetch import Fetch 29from bb.fetch2 import Fetch
30from bb.fetch import runfetchcmd 30from bb.fetch2 import runfetchcmd
31 31
32class Repo(Fetch): 32class Repo(Fetch):
33 """Class to fetch a module or modules from repo (git) repositories""" 33 """Class to fetch a module or modules from repo (git) repositories"""
diff --git a/bitbake/lib/bb/fetch2/ssh.py b/bitbake/lib/bb/fetch2/ssh.py
index 86c76f4e44..8b283222bf 100644
--- a/bitbake/lib/bb/fetch2/ssh.py
+++ b/bitbake/lib/bb/fetch2/ssh.py
@@ -38,8 +38,8 @@ IETF secsh internet draft:
38 38
39import re, os 39import re, os
40from bb import data 40from bb import data
41from bb.fetch import Fetch 41from bb.fetch2 import Fetch
42from bb.fetch import FetchError 42from bb.fetch2 import FetchError
43 43
44 44
45__pattern__ = re.compile(r''' 45__pattern__ = re.compile(r'''
diff --git a/bitbake/lib/bb/fetch2/svk.py b/bitbake/lib/bb/fetch2/svk.py
index 595a9da255..7990ff21fa 100644
--- a/bitbake/lib/bb/fetch2/svk.py
+++ b/bitbake/lib/bb/fetch2/svk.py
@@ -29,10 +29,10 @@ import os
29import logging 29import logging
30import bb 30import bb
31from bb import data 31from bb import data
32from bb.fetch import Fetch 32from bb.fetch2 import Fetch
33from bb.fetch import FetchError 33from bb.fetch2 import FetchError
34from bb.fetch import MissingParameterError 34from bb.fetch2 import MissingParameterError
35from bb.fetch import logger 35from bb.fetch2 import logger
36 36
37class Svk(Fetch): 37class Svk(Fetch):
38 """Class to fetch a module or modules from svk repositories""" 38 """Class to fetch a module or modules from svk repositories"""
diff --git a/bitbake/lib/bb/fetch2/svn.py b/bitbake/lib/bb/fetch2/svn.py
index 8f053abf74..3315b159da 100644
--- a/bitbake/lib/bb/fetch2/svn.py
+++ b/bitbake/lib/bb/fetch2/svn.py
@@ -28,11 +28,11 @@ import sys
28import logging 28import logging
29import bb 29import bb
30from bb import data 30from bb import data
31from bb.fetch import Fetch 31from bb.fetch2 import Fetch
32from bb.fetch import FetchError 32from bb.fetch2 import FetchError
33from bb.fetch import MissingParameterError 33from bb.fetch2 import MissingParameterError
34from bb.fetch import runfetchcmd 34from bb.fetch2 import runfetchcmd
35from bb.fetch import logger 35from bb.fetch2 import logger
36 36
37class Svn(Fetch): 37class Svn(Fetch):
38 """Class to fetch a module or modules from svn repositories""" 38 """Class to fetch a module or modules from svn repositories"""
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 4d4bdfd493..cf36ccad0a 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -30,7 +30,7 @@ import logging
30import bb 30import bb
31import urllib 31import urllib
32from bb import data 32from bb import data
33from bb.fetch import Fetch, FetchError, encodeurl, decodeurl, logger, runfetchcmd 33from bb.fetch2 import Fetch, FetchError, encodeurl, decodeurl, logger, runfetchcmd
34 34
35class Wget(Fetch): 35class Wget(Fetch):
36 """Class to fetch urls via 'wget'""" 36 """Class to fetch urls via 'wget'"""