diff options
-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 76dde3a0b..b23e9eef8 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 5984818f9..21259a23b 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 6b9382280..ee3bd2f7f 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 97b618228..b594d2bde 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: |