summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/svk.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-19 14:32:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-22 12:03:02 +0000
commit9d7f8e2a206f8266fd0766b6161dbd1bf6b787a7 (patch)
tree2002648fd17558c7d895d672aa65fa46f4b82250 /bitbake/lib/bb/fetch2/svk.py
parent4acc7322a2ada941b803e1aee23d84351888eef0 (diff)
downloadpoky-9d7f8e2a206f8266fd0766b6161dbd1bf6b787a7.tar.gz
bitbake: fetch2: Stop passing around the pointless url parameter
There is no good reason to keep passing around the url parameter when its contained within urldata (ud). This is left around due to legacy reasons, some functions take it, some don't and its time to cleanup. This is fetcher internal API, there are a tiny number of external users of the internal API (buildhistory and distrodata) which can be fixed up after this change. (Bitbake rev: 6a48474de9505a3700863f31839a7c53c5e18a8d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/svk.py')
-rw-r--r--bitbake/lib/bb/fetch2/svk.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/svk.py b/bitbake/lib/bb/fetch2/svk.py
index ee3823f845..23631b43f4 100644
--- a/bitbake/lib/bb/fetch2/svk.py
+++ b/bitbake/lib/bb/fetch2/svk.py
@@ -37,7 +37,7 @@ from bb.fetch2 import runfetchcmd
37 37
38class Svk(FetchMethod): 38class Svk(FetchMethod):
39 """Class to fetch a module or modules from svk repositories""" 39 """Class to fetch a module or modules from svk repositories"""
40 def supports(self, url, ud, d): 40 def supports(self, ud, d):
41 """ 41 """
42 Check to see if a given url can be fetched with svk. 42 Check to see if a given url can be fetched with svk.
43 """ 43 """
@@ -54,14 +54,14 @@ class Svk(FetchMethod):
54 54
55 ud.localfile = data.expand('%s_%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision, ud.date), d) 55 ud.localfile = data.expand('%s_%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision, ud.date), d)
56 56
57 def need_update(self, url, ud, d): 57 def need_update(self, ud, d):
58 if ud.date == "now": 58 if ud.date == "now":
59 return True 59 return True
60 if not os.path.exists(ud.localpath): 60 if not os.path.exists(ud.localpath):
61 return True 61 return True
62 return False 62 return False
63 63
64 def download(self, loc, ud, d): 64 def download(self, ud, d):
65 """Fetch urls""" 65 """Fetch urls"""
66 66
67 svkroot = ud.host + ud.path 67 svkroot = ud.host + ud.path
@@ -81,11 +81,11 @@ class Svk(FetchMethod):
81 tmpfile = tmpfile.strip() 81 tmpfile = tmpfile.strip()
82 if not tmpfile: 82 if not tmpfile:
83 logger.error() 83 logger.error()
84 raise FetchError("Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.", loc) 84 raise FetchError("Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.", ud.url)
85 85
86 # check out sources there 86 # check out sources there
87 os.chdir(tmpfile) 87 os.chdir(tmpfile)
88 logger.info("Fetch " + loc) 88 logger.info("Fetch " + ud.url)
89 logger.debug(1, "Running %s", svkcmd) 89 logger.debug(1, "Running %s", svkcmd)
90 runfetchcmd(svkcmd, d, cleanup = [tmpfile]) 90 runfetchcmd(svkcmd, d, cleanup = [tmpfile])
91 91