summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-07 12:08:32 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-07 16:52:42 +0000
commit37624b97450f2ba3d6fad3e1e51818486451447e (patch)
tree6d5286aeb128da853f829ee28923005fb29405fe /bitbake/lib/bb/fetch2/git.py
parent1d3fdc85c64b07a228bcf2a370024c250f6e6623 (diff)
downloadpoky-37624b97450f2ba3d6fad3e1e51818486451447e.tar.gz
bitbake/fetch2: Update forcefetch and mirror handling to clean up, simplfy and bug fix the code
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r--bitbake/lib/bb/fetch2/git.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 55c66cf49a..6bcc4a4838 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -80,7 +80,7 @@ class Git(FetchMethod):
80 def localpath(self, url, ud, d): 80 def localpath(self, url, ud, d):
81 return ud.clonedir 81 return ud.clonedir
82 82
83 def forcefetch(self, url, ud, d): 83 def need_update(self, u, ud, d):
84 if not os.path.exists(ud.clonedir): 84 if not os.path.exists(ud.clonedir):
85 return True 85 return True
86 os.chdir(ud.clonedir) 86 os.chdir(ud.clonedir)
@@ -90,13 +90,12 @@ class Git(FetchMethod):
90 return False 90 return False
91 91
92 def try_premirror(self, u, ud, d): 92 def try_premirror(self, u, ud, d):
93 if 'noclone' in ud.parm: 93 # If we don't do this, updating an existing checkout with only premirrors
94 return False 94 # is not possible
95 if bb.data.getVar("BB_FETCH_PREMIRRORONLY", d, True) is not None:
96 return True
95 if os.path.exists(ud.clonedir): 97 if os.path.exists(ud.clonedir):
96 return False 98 return False
97 if os.path.exists(ud.localpath):
98 return False
99
100 return True 99 return True
101 100
102 def download(self, loc, ud, d): 101 def download(self, loc, ud, d):