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/bzr.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'bitbake/lib/bb/fetch2/bzr.py') diff --git a/bitbake/lib/bb/fetch2/bzr.py b/bitbake/lib/bb/fetch2/bzr.py index 5d9e5f907c..3caaa6fca9 100644 --- a/bitbake/lib/bb/fetch2/bzr.py +++ b/bitbake/lib/bb/fetch2/bzr.py @@ -34,7 +34,7 @@ from bb.fetch2 import runfetchcmd from bb.fetch2 import logger class Bzr(FetchMethod): - def supports(self, url, ud, d): + def supports(self, ud, d): return ud.type in ['bzr'] def urldata_init(self, ud, d): @@ -81,12 +81,12 @@ class Bzr(FetchMethod): return bzrcmd - def download(self, loc, ud, d): + def download(self, ud, d): """Fetch url""" if os.access(os.path.join(ud.pkgdir, os.path.basename(ud.pkgdir), '.bzr'), os.R_OK): bzrcmd = self._buildbzrcommand(ud, d, "update") - logger.debug(1, "BZR Update %s", loc) + logger.debug(1, "BZR Update %s", ud.url) bb.fetch2.check_network_access(d, bzrcmd, ud.url) os.chdir(os.path.join (ud.pkgdir, os.path.basename(ud.path))) runfetchcmd(bzrcmd, d) @@ -94,7 +94,7 @@ class Bzr(FetchMethod): bb.utils.remove(os.path.join(ud.pkgdir, os.path.basename(ud.pkgdir)), True) bzrcmd = self._buildbzrcommand(ud, d, "fetch") bb.fetch2.check_network_access(d, bzrcmd, ud.url) - logger.debug(1, "BZR Checkout %s", loc) + logger.debug(1, "BZR Checkout %s", ud.url) bb.utils.mkdirhier(ud.pkgdir) os.chdir(ud.pkgdir) logger.debug(1, "Running %s", bzrcmd) @@ -114,17 +114,17 @@ class Bzr(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 "bzr:" + ud.pkgdir - def _latest_revision(self, url, ud, d, name): + def _latest_revision(self, ud, d, name): """ Return the latest upstream revision number """ - logger.debug(2, "BZR fetcher hitting network for %s", url) + logger.debug(2, "BZR fetcher hitting network for %s", ud.url) bb.fetch2.check_network_access(d, self._buildbzrcommand(ud, d, "revno"), ud.url) @@ -132,12 +132,12 @@ class Bzr(FetchMethod): return output.strip() - 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