bitbake/fetchers: Sync with upstream bitbake

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3191 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie
2007-11-17 22:20:55 +00:00
parent dd45ce7f88
commit 688eca78c0
4 changed files with 16 additions and 22 deletions

View File

@@ -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

View File

@@ -134,4 +134,5 @@ class Git(Fetch):
return output.split()[0]
def _build_revision(self, url, ud, d):
return ud.tag
return ud.tag

View File

@@ -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)

View File

@@ -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: