[poky] [PATCH 3/8] svn.py: move svn specific url data initialization earlier
Yu Ke
ke.yu at intel.com
Mon Dec 27 05:57:27 PST 2010
move the url data init earlier, so that Svn.latest_revision()
can work before Svn.localpath()
This change allow FetchData:__init__ to set FetchData.revison by
Svn.latest_revision()
Signed-off-by: Yu Ke <ke.yu at intel.com>
---
bitbake/lib/bb/fetch/svn.py | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/bitbake/lib/bb/fetch/svn.py b/bitbake/lib/bb/fetch/svn.py
index 42058f5..4e97a30 100644
--- a/bitbake/lib/bb/fetch/svn.py
+++ b/bitbake/lib/bb/fetch/svn.py
@@ -38,9 +38,17 @@ class Svn(Fetch):
"""
Check to see if a given url can be fetched with svn.
"""
- return ud.type in ['svn']
+ if ud.type in ['svn']:
+ self.urldata_init(ud, d)
+ return True
+ else:
+ return False
- def localpath(self, url, ud, d):
+ def urldata_init(self, ud, d):
+ """
+ init svn specific variable within url data
+ so that the method like latest_revision() can work
+ """
if not "module" in ud.parm:
raise MissingParameterError("svn method needs a 'module' parameter")
@@ -54,6 +62,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']
--
1.7.0.4
More information about the poky
mailing list