summaryrefslogtreecommitdiffstats
path: root/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-10 23:37:11 +0000
commit122d3609cdd83d28cc0770195e4aa30bb8737393 (patch)
tree5b0b57f68d70a6cb8a778eeabf325123e7ccc914 /lib/bb/fetch2/git.py
parent97dbbae5fa366ce4fa51b62006c42d5e568c6390 (diff)
downloadbitbake-122d3609cdd83d28cc0770195e4aa30bb8737393.tar.gz
bitbake/fetch2: Update forcefetch and mirror handling to clean up, simplfy and bug fix the code
(From Poky rev: 37624b97450f2ba3d6fad3e1e51818486451447e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/git.py')
-rw-r--r--lib/bb/fetch2/git.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 55c66cf49..6bcc4a483 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -80,7 +80,7 @@ class Git(FetchMethod):
def localpath(self, url, ud, d):
return ud.clonedir
- def forcefetch(self, url, ud, d):
+ def need_update(self, u, ud, d):
if not os.path.exists(ud.clonedir):
return True
os.chdir(ud.clonedir)
@@ -90,13 +90,12 @@ class Git(FetchMethod):
return False
def try_premirror(self, u, ud, d):
- if 'noclone' in ud.parm:
- return False
+ # If we don't do this, updating an existing checkout with only premirrors
+ # is not possible
+ if bb.data.getVar("BB_FETCH_PREMIRRORONLY", d, True) is not None:
+ return True
if os.path.exists(ud.clonedir):
return False
- if os.path.exists(ud.localpath):
- return False
-
return True
def download(self, loc, ud, d):