summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch/svn.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2007-08-02 23:52:40 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2007-08-02 23:52:40 +0000
commitbefeeef96230980a170a0de329fe9ea4af2d3ce5 (patch)
treeba93dbc120e8dc895ca05c041c33c73e5b6987d8 /lib/bb/fetch/svn.py
parent9aa602e50df18b4b91631f4357a54dcde3a487d9 (diff)
downloadbitbake-befeeef96230980a170a0de329fe9ea4af2d3ce5.tar.gz
fetcher updates: Add SRCREV support to git, fix svn SRCREV lockdown support, clean up fetcher force options, finish sortable_revision implementation
Diffstat (limited to 'lib/bb/fetch/svn.py')
-rw-r--r--lib/bb/fetch/svn.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/bb/fetch/svn.py b/lib/bb/fetch/svn.py
index e16ec4ba7..ca12efe15 100644
--- a/lib/bb/fetch/svn.py
+++ b/lib/bb/fetch/svn.py
@@ -62,15 +62,22 @@ class Svn(Fetch):
ud.revision = ""
else:
#
- # ***Nasty hack***
+ # ***Nasty hacks***
# If DATE in unexpanded PV, use ud.date (which is set from SRCDATE)
# Will warn people to switch to SRCREV here
#
+ # How can we tell when a user has overriden SRCDATE?
+ # check for "get_srcdate" in unexpanded SRCREV - ugly
+ #
pv = data.getVar("PV", d, 0)
if "DATE" in pv:
ud.revision = ""
else:
- ud.revision = self.latest_revision(url, ud, d)
+ rev = data.getVar("SRCREV", d, 0)
+ if "get_srcrev" in rev:
+ ud.revision = self.latest_revision(url, ud, d)
+ else:
+ ud.revision = rev
ud.date = ""
ud.localfile = data.expand('%s_%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision, ud.date), d)
@@ -128,7 +135,7 @@ class Svn(Fetch):
"""Fetch url"""
# try to use the tarball stash
- if not self.forcefetch(loc, ud, d) and Fetch.try_mirror(d, ud.localfile):
+ if Fetch.try_mirror(d, ud.localfile):
bb.msg.debug(1, bb.msg.domain.Fetcher, "%s already exists or was mirrored, skipping svn checkout." % ud.localpath)
return