]> code.ossystems Code Review - openembedded-core.git/commitdiff
bb.fetch2.svn.py: add urldata_init
authorYu Ke <ke.yu@intel.com>
Mon, 27 Dec 2010 02:07:04 +0000 (10:07 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 10 Jan 2011 20:21:48 +0000 (20:21 +0000)
move the svn 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/svn.py

index 3315b159da242e595015a3b66f7bc0f1214d7faa..c0a7a548cca769bc65b4475597f52b0cb1dbe831 100644 (file)
@@ -42,7 +42,10 @@ class Svn(Fetch):
         """
         return ud.type in ['svn']
 
-    def localpath(self, url, ud, d):
+    def urldata_init(self, ud, d):
+        """
+        init svn specific variable within url data
+        """
         if not "module" in ud.parm:
             raise MissingParameterError("svn method needs a 'module' parameter")
 
@@ -53,6 +56,7 @@ class Svn(Fetch):
         ud.pkgdir = os.path.join(data.expand('${SVNDIR}', d), ud.host, relpath)
         ud.moddir = os.path.join(ud.pkgdir, ud.module)
 
+    def localpath(self, url, ud, d):
         if 'rev' in ud.parm:
             ud.date = ""
             ud.revision = ud.parm['rev']