diff options
Diffstat (limited to 'bitbake/lib/bb/fetch/bzr.py')
-rw-r--r-- | bitbake/lib/bb/fetch/bzr.py | 25 |
1 files changed, 13 insertions, 12 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): | |||
45 | relpath = relpath[1:] | 45 | relpath = relpath[1:] |
46 | ud.pkgdir = os.path.join(data.expand('${BZRDIR}', d), ud.host, relpath) | 46 | ud.pkgdir = os.path.join(data.expand('${BZRDIR}', d), ud.host, relpath) |
47 | 47 | ||
48 | if 'rev' in ud.parm: | 48 | revision = Fetch.srcrev_internal_helper(ud, d) |
49 | ud.revision = ud.parm['rev'] | 49 | if revision is True: |
50 | else: | 50 | ud.revision = self.latest_revision(url, ud, d) |
51 | rev = data.getVar("SRCREV", d, 1) | 51 | elif revision: |
52 | if rev is "SRCREVINACTION": | 52 | ud.revision = revision |
53 | rev = self.latest_revision(url, ud, d) | 53 | |
54 | if rev: | 54 | if not ud.revision: |
55 | ud.revision = rev | 55 | ud.revision = self.latest_revision(url, ud, d) |
56 | else: | ||
57 | ud.revision = "" | ||
58 | 56 | ||
59 | ud.localfile = data.expand('bzr_%s_%s_%s.tar.gz' % (ud.host, ud.path.replace('/', '.'), ud.revision), d) | 57 | ud.localfile = data.expand('bzr_%s_%s_%s.tar.gz' % (ud.host, ud.path.replace('/', '.'), ud.revision), d) |
60 | 58 | ||
@@ -147,7 +145,10 @@ class Bzr(Fetch): | |||
147 | def _sortable_revision(self, url, ud, d): | 145 | def _sortable_revision(self, url, ud, d): |
148 | """ | 146 | """ |
149 | Return a sortable revision number which in our case is the revision number | 147 | Return a sortable revision number which in our case is the revision number |
150 | (use the cached version to avoid network access) | ||
151 | """ | 148 | """ |
152 | 149 | ||
153 | return self.latest_revision(url, ud, d) | 150 | return self._build_revision(url, ud, d) |
151 | |||
152 | def _build_revision(self, url, ud, d): | ||
153 | return ud.revision | ||
154 | |||