From 9d7f8e2a206f8266fd0766b6161dbd1bf6b787a7 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 19 Nov 2013 14:32:08 +0000 Subject: 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 --- bitbake/lib/bb/fetch2/svn.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'bitbake/lib/bb/fetch2/svn.py') 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 class Svn(FetchMethod): """Class to fetch a module or modules from svn repositories""" - def supports(self, url, ud, d): + def supports(self, ud, d): """ Check to see if a given url can be fetched with svn. """ @@ -112,14 +112,14 @@ class Svn(FetchMethod): return svncmd - def download(self, loc, ud, d): + def download(self, ud, d): """Fetch url""" logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'") if os.access(os.path.join(ud.moddir, '.svn'), os.R_OK): svnupdatecmd = self._buildsvncommand(ud, d, "update") - logger.info("Update " + loc) + logger.info("Update " + ud.url) # update sources there os.chdir(ud.moddir) # We need to attempt to run svn upgrade first in case its an older working format @@ -132,7 +132,7 @@ class Svn(FetchMethod): runfetchcmd(svnupdatecmd, d) else: svnfetchcmd = self._buildsvncommand(ud, d, "fetch") - logger.info("Fetch " + loc) + logger.info("Fetch " + ud.url) # check out sources there bb.utils.mkdirhier(ud.pkgdir) os.chdir(ud.pkgdir) @@ -160,13 +160,13 @@ class Svn(FetchMethod): def supports_srcrev(self): return True - def _revision_key(self, url, ud, d, name): + def _revision_key(self, ud, d, name): """ Return a unique key for the url """ return "svn:" + ud.moddir - def _latest_revision(self, url, ud, d, name): + def _latest_revision(self, ud, d, name): """ Return the latest upstream revision number """ @@ -180,12 +180,12 @@ class Svn(FetchMethod): return revision - def sortable_revision(self, url, ud, d, name): + def sortable_revision(self, ud, d, name): """ Return a sortable revision number which in our case is the revision number """ - return False, self._build_revision(url, ud, d) + return False, self._build_revision(ud, d) - def _build_revision(self, url, ud, d): + def _build_revision(self, ud, d): return ud.revision -- cgit v1.2.3-54-g00ecf