summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch/git.py
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2010-09-08 14:03:41 +0100
committerJoshua Lock <josh@linux.intel.com>2010-09-08 14:25:24 +0100
commit7117a4458b0bf25dbe380f01e98e236ec3856e26 (patch)
tree6d13f3e6a826eadfd159a47d7b1e8831c4c3201b /bitbake/lib/bb/fetch/git.py
parent7b580b488cb60ce4166ef2539496e83385779aa7 (diff)
downloadpoky-7117a4458b0bf25dbe380f01e98e236ec3856e26.tar.gz
bitbake/fetch: add try_premirror method and special case git fetcher
Add a new method, try_premirror, to the Fetch object which checks to see whether the file needs to be fetched from a premirror. Override this in the Git fetcher to only require a pre-mirror fetch when the clone directory does not exist. Fixes [BUGID 290] Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/fetch/git.py')
-rw-r--r--bitbake/lib/bb/fetch/git.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py
index b6126cbe91..938e0c08ba 100644
--- a/bitbake/lib/bb/fetch/git.py
+++ b/bitbake/lib/bb/fetch/git.py
@@ -90,6 +90,12 @@ class Git(Fetch):
90 return True 90 return True
91 return False 91 return False
92 92
93 def try_premirror(self, d, ud):
94 if os.path.exists(ud.clonedir):
95 return False
96
97 return True
98
93 def go(self, loc, ud, d): 99 def go(self, loc, ud, d):
94 """Fetch url""" 100 """Fetch url"""
95 101