summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/svn.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/svn.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/svn.py')
-rw-r--r--bitbake/lib/bb/fetch2/svn.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/bitbake/lib/bb/fetch2/svn.py b/bitbake/lib/bb/fetch2/svn.py
index 123aa136eb..8847461913 100644
--- a/bitbake/lib/bb/fetch2/svn.py
+++ b/bitbake/lib/bb/fetch2/svn.py
@@ -37,7 +37,7 @@ from bb.fetch2 import logger
37 37
38class Svn(FetchMethod): 38class Svn(FetchMethod):
39 """Class to fetch a module or modules from svn repositories""" 39 """Class to fetch a module or modules from svn 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 svn. 42 Check to see if a given url can be fetched with svn.
43 """ 43 """
@@ -112,14 +112,14 @@ class Svn(FetchMethod):
112 112
113 return svncmd 113 return svncmd
114 114
115 def download(self, loc, ud, d): 115 def download(self, ud, d):
116 """Fetch url""" 116 """Fetch url"""
117 117
118 logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'") 118 logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'")
119 119
120 if os.access(os.path.join(ud.moddir, '.svn'), os.R_OK): 120 if os.access(os.path.join(ud.moddir, '.svn'), os.R_OK):
121 svnupdatecmd = self._buildsvncommand(ud, d, "update") 121 svnupdatecmd = self._buildsvncommand(ud, d, "update")
122 logger.info("Update " + loc) 122 logger.info("Update " + ud.url)
123 # update sources there 123 # update sources there
124 os.chdir(ud.moddir) 124 os.chdir(ud.moddir)
125 # We need to attempt to run svn upgrade first in case its an older working format 125 # We need to attempt to run svn upgrade first in case its an older working format
@@ -132,7 +132,7 @@ class Svn(FetchMethod):
132 runfetchcmd(svnupdatecmd, d) 132 runfetchcmd(svnupdatecmd, d)
133 else: 133 else:
134 svnfetchcmd = self._buildsvncommand(ud, d, "fetch") 134 svnfetchcmd = self._buildsvncommand(ud, d, "fetch")
135 logger.info("Fetch " + loc) 135 logger.info("Fetch " + ud.url)
136 # check out sources there 136 # check out sources there
137 bb.utils.mkdirhier(ud.pkgdir) 137 bb.utils.mkdirhier(ud.pkgdir)
138 os.chdir(ud.pkgdir) 138 os.chdir(ud.pkgdir)
@@ -160,13 +160,13 @@ class Svn(FetchMethod):
160 def supports_srcrev(self): 160 def supports_srcrev(self):
161 return True 161 return True
162 162
163 def _revision_key(self, url, ud, d, name): 163 def _revision_key(self, ud, d, name):
164 """ 164 """
165 Return a unique key for the url 165 Return a unique key for the url
166 """ 166 """
167 return "svn:" + ud.moddir 167 return "svn:" + ud.moddir
168 168
169 def _latest_revision(self, url, ud, d, name): 169 def _latest_revision(self, ud, d, name):
170 """ 170 """
171 Return the latest upstream revision number 171 Return the latest upstream revision number
172 """ 172 """
@@ -180,12 +180,12 @@ class Svn(FetchMethod):
180 180
181 return revision 181 return revision
182 182
183 def sortable_revision(self, url, ud, d, name): 183 def sortable_revision(self, ud, d, name):
184 """ 184 """
185 Return a sortable revision number which in our case is the revision number 185 Return a sortable revision number which in our case is the revision number
186 """ 186 """
187 187
188 return False, self._build_revision(url, ud, d) 188 return False, self._build_revision(ud, d)
189 189
190 def _build_revision(self, url, ud, d): 190 def _build_revision(self, ud, d):
191 return ud.revision 191 return ud.revision