]> code.ossystems Code Review - openembedded-core.git/commitdiff
bb.fetch2.bzr: add bzr urldata_init
authorYu Ke <ke.yu@intel.com>
Mon, 27 Dec 2010 02:48:34 +0000 (10:48 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 10 Jan 2011 20:22:12 +0000 (20:22 +0000)
move the bzr specific urldata init from localpath to urldata_init
so that it can be called early

Signed-off-by: Yu Ke <ke.yu@intel.com>
bitbake/lib/bb/fetch2/bzr.py

index 3d23b4d3cfcc9204ad713909b9fa6533d46bce07..1368f172d378fd74bd8ed8c0880b264499df075d 100644 (file)
@@ -34,12 +34,15 @@ class Bzr(Fetch):
     def supports(self, url, ud, d):
         return ud.type in ['bzr']
 
-    def localpath (self, url, ud, d):
-
+    def urldata_init(self, ud, d):
+        """
+        init bzr specific variable within url data
+        """
         # Create paths to bzr checkouts
         relpath = self._strip_leading_slashes(ud.path)
         ud.pkgdir = os.path.join(data.expand('${BZRDIR}', d), ud.host, relpath)
 
+    def localpath (self, url, ud, d):
         revision = Fetch.srcrev_internal_helper(ud, d)
         if revision is True:
             ud.revision = self.latest_revision(url, ud, d)