1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

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>
This commit is contained in:
Richard Purdie
2011-02-07 12:08:32 +00:00
parent 1d3fdc85c6
commit 37624b9745
5 changed files with 65 additions and 81 deletions
+5 -6
View File
@@ -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):