diff options
author | Yu Ke <ke.yu@intel.com> | 2010-12-27 10:35:19 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-10 20:21:59 +0000 |
commit | f684ff18a2b9565823a41750af369dee392f6142 (patch) | |
tree | 60fcf2a37610fccbe2b62aebd75068adce615016 /bitbake/lib | |
parent | 7420e70f4f03a18f9d5a0d3226918088af1032bd (diff) | |
download | openembedded-core-f684ff18a2b9565823a41750af369dee392f6142.tar.gz openembedded-core-f684ff18a2b9565823a41750af369dee392f6142.tar.bz2 openembedded-core-f684ff18a2b9565823a41750af369dee392f6142.zip |
bb.fetch2.hg: add hg urldata_init
move the hg specific urldata init from localpath to urldata_init
so that it can be called early
Signed-off-by: Yu Ke <ke.yu@intel.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/fetch2/hg.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py index 9e91bec186..80a155108c 100644 --- a/bitbake/lib/bb/fetch2/hg.py +++ b/bitbake/lib/bb/fetch2/hg.py @@ -43,11 +43,10 @@ class Hg(Fetch): """ return ud.type in ['hg'] - def forcefetch(self, url, ud, d): - revTag = ud.parm.get('rev', 'tip') - return revTag == "tip" - - def localpath(self, url, ud, d): + def urldata_init(self, ud, d): + """ + init hg specific variable within url data + """ if not "module" in ud.parm: raise MissingParameterError("hg method needs a 'module' parameter") @@ -58,6 +57,11 @@ class Hg(Fetch): ud.pkgdir = os.path.join(data.expand('${HGDIR}', d), ud.host, relpath) ud.moddir = os.path.join(ud.pkgdir, ud.module) + def forcefetch(self, url, ud, d): + revTag = ud.parm.get('rev', 'tip') + return revTag == "tip" + + def localpath(self, url, ud, d): if 'rev' in ud.parm: ud.revision = ud.parm['rev'] else: |