summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch/svn.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2006-11-12 17:21:07 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2006-11-12 17:21:07 +0000
commit45a24b5c03684f19b49b8b26b764618c959367df (patch)
treeb3b7eab06b5c67bd6ec8f3e55575ade151bdb10d /lib/bb/fetch/svn.py
parentab6bc07a319278a1b61ab58dc660ad7e9508542a (diff)
downloadbitbake-45a24b5c03684f19b49b8b26b764618c959367df.tar.gz
Fetchers: Add forcefetch method for handling of SRCDATE now or tag=master. Move md5 code from wget.py into the fetchre core. Start generating md5 stamps for all downloads including scm tarballs. When a download is accessed, touch the md5 file to allow easy creation of source mirrors
Diffstat (limited to 'lib/bb/fetch/svn.py')
-rw-r--r--lib/bb/fetch/svn.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/bb/fetch/svn.py b/lib/bb/fetch/svn.py
index a88617eb4..b4e825eeb 100644
--- a/lib/bb/fetch/svn.py
+++ b/lib/bb/fetch/svn.py
@@ -55,9 +55,19 @@ class Svn(Fetch):
return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
+ def forcefetch(self, url, ud, d):
+ if (ud.date == "now"):
+ return True
+ return False
+
def go(self, loc, ud, d):
"""Fetch url"""
+ # try to use the tarball stash
+ if not self.forcefetch(loc, ud, d) and 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
+
# setup svn options
options = []
@@ -69,11 +79,6 @@ class Svn(Fetch):
if proto == "svn+ssh" and "rsh" in ud.parm:
svn_rsh = ud.parm["rsh"]
- # try to use the tarball stash
- if (ud.date != "now") and 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
-
svnroot = ud.host + ud.path
# either use the revision, or SRCDATE in braces, or nothing for SRCDATE = "now"