diff options
author | Richard Purdie <richard@openedhand.com> | 2007-11-17 22:20:55 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-11-17 22:20:55 +0000 |
commit | 688eca78c088dc45957dde6cc74204f5ac83e5ca (patch) | |
tree | a6e3d6e1f0ef13e4702f2ed577a6d41c5dcd5095 /bitbake/lib/bb/fetch | |
parent | dd45ce7f888f6d05b15367275b5314860c263cdf (diff) | |
download | openembedded-core-688eca78c088dc45957dde6cc74204f5ac83e5ca.tar.gz openembedded-core-688eca78c088dc45957dde6cc74204f5ac83e5ca.tar.bz2 openembedded-core-688eca78c088dc45957dde6cc74204f5ac83e5ca.zip |
bitbake/fetchers: Sync with upstream bitbake
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3191 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/fetch')
-rw-r--r-- | bitbake/lib/bb/fetch/bzr.py | 25 | ||||
-rw-r--r-- | bitbake/lib/bb/fetch/git.py | 3 | ||||
-rw-r--r-- | bitbake/lib/bb/fetch/hg.py | 8 | ||||
-rw-r--r-- | bitbake/lib/bb/fetch/perforce.py | 2 |
4 files changed, 16 insertions, 22 deletions
diff --git a/bitbake/lib/bb/fetch/bzr.py b/bitbake/lib/bb/fetch/bzr.py index 76dde3a0bd..b23e9eef86 100644 --- a/bitbake/lib/bb/fetch/bzr.py +++ b/bitbake/lib/bb/fetch/bzr.py @@ -45,16 +45,14 @@ class Bzr(Fetch): relpath = relpath[1:] ud.pkgdir = os.path.join(data.expand('${BZRDIR}', d), ud.host, relpath) - if 'rev' in ud.parm: - ud.revision = ud.parm['rev'] - else: - rev = data.getVar("SRCREV", d, 1) - if rev is "SRCREVINACTION": - rev = self.latest_revision(url, ud, d) - if rev: - ud.revision = rev - else: - ud.revision = "" + revision = Fetch.srcrev_internal_helper(ud, d) + if revision is True: + ud.revision = self.latest_revision(url, ud, d) + elif revision: + ud.revision = revision + + if not ud.revision: + ud.revision = self.latest_revision(url, ud, d) ud.localfile = data.expand('bzr_%s_%s_%s.tar.gz' % (ud.host, ud.path.replace('/', '.'), ud.revision), d) @@ -147,7 +145,10 @@ class Bzr(Fetch): def _sortable_revision(self, url, ud, d): """ Return a sortable revision number which in our case is the revision number - (use the cached version to avoid network access) """ - return self.latest_revision(url, ud, d) + return self._build_revision(url, ud, d) + + def _build_revision(self, url, ud, d): + return ud.revision + diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py index 5984818f9e..21259a23b0 100644 --- a/bitbake/lib/bb/fetch/git.py +++ b/bitbake/lib/bb/fetch/git.py @@ -134,4 +134,5 @@ class Git(Fetch): return output.split()[0] def _build_revision(self, url, ud, d): - return ud.tag + return ud.tag + diff --git a/bitbake/lib/bb/fetch/hg.py b/bitbake/lib/bb/fetch/hg.py index 6b93822803..ee3bd2f7fe 100644 --- a/bitbake/lib/bb/fetch/hg.py +++ b/bitbake/lib/bb/fetch/hg.py @@ -57,14 +57,6 @@ class Hg(Fetch): if 'rev' in ud.parm: ud.revision = ud.parm['rev'] - #else: - # rev = data.getVar("SRCREV", d, 1) - # if rev is "SRCREVINACTION": - # rev = self.latest_revision(url, ud, d) - # if rev: - # ud.revision = rev - # else: - # ud.revision = "" ud.localfile = data.expand('%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision), d) diff --git a/bitbake/lib/bb/fetch/perforce.py b/bitbake/lib/bb/fetch/perforce.py index 97b618228b..b594d2bde2 100644 --- a/bitbake/lib/bb/fetch/perforce.py +++ b/bitbake/lib/bb/fetch/perforce.py @@ -37,7 +37,7 @@ class Perforce(Fetch): return ud.type in ['p4'] def doparse(url,d): - parm=[] + parm = {} path = url.split("://")[1] delim = path.find("@"); if delim != -1: |