summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-11-17 22:20:55 +0000
committerRichard Purdie <richard@openedhand.com>2007-11-17 22:20:55 +0000
commit688eca78c088dc45957dde6cc74204f5ac83e5ca (patch)
treea6e3d6e1f0ef13e4702f2ed577a6d41c5dcd5095 /bitbake
parentdd45ce7f888f6d05b15367275b5314860c263cdf (diff)
downloadpoky-688eca78c088dc45957dde6cc74204f5ac83e5ca.tar.gz
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')
-rw-r--r--bitbake/lib/bb/fetch/bzr.py25
-rw-r--r--bitbake/lib/bb/fetch/git.py3
-rw-r--r--bitbake/lib/bb/fetch/hg.py8
-rw-r--r--bitbake/lib/bb/fetch/perforce.py2
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):
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
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):
134 return output.split()[0] 134 return output.split()[0]
135 135
136 def _build_revision(self, url, ud, d): 136 def _build_revision(self, url, ud, d):
137 return ud.tag 137 return ud.tag
138
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):
57 57
58 if 'rev' in ud.parm: 58 if 'rev' in ud.parm:
59 ud.revision = ud.parm['rev'] 59 ud.revision = ud.parm['rev']
60 #else:
61 # rev = data.getVar("SRCREV", d, 1)
62 # if rev is "SRCREVINACTION":
63 # rev = self.latest_revision(url, ud, d)
64 # if rev:
65 # ud.revision = rev
66 # else:
67 # ud.revision = ""
68 60
69 ud.localfile = data.expand('%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision), d) 61 ud.localfile = data.expand('%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision), d)
70 62
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):
37 return ud.type in ['p4'] 37 return ud.type in ['p4']
38 38
39 def doparse(url,d): 39 def doparse(url,d):
40 parm=[] 40 parm = {}
41 path = url.split("://")[1] 41 path = url.split("://")[1]
42 delim = path.find("@"); 42 delim = path.find("@");
43 if delim != -1: 43 if delim != -1: