summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/git.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 35da14d71b..e46ea4893b 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -299,17 +299,22 @@ class Git(FetchMethod):
299 return ud.clonedir 299 return ud.clonedir
300 300
301 def need_update(self, ud, d): 301 def need_update(self, ud, d):
302 return self.clonedir_need_update(ud, d) or self.shallow_tarball_need_update(ud) or self.tarball_need_update(ud)
303
304 def clonedir_need_update(self, ud, d):
302 if not os.path.exists(ud.clonedir): 305 if not os.path.exists(ud.clonedir):
303 return True 306 return True
304 for name in ud.names: 307 for name in ud.names:
305 if not self._contains_ref(ud, d, name, ud.clonedir): 308 if not self._contains_ref(ud, d, name, ud.clonedir):
306 return True 309 return True
307 if ud.shallow and ud.write_shallow_tarballs and not os.path.exists(ud.fullshallow):
308 return True
309 if ud.write_tarballs and not os.path.exists(ud.fullmirror):
310 return True
311 return False 310 return False
312 311
312 def shallow_tarball_need_update(self, ud):
313 return ud.shallow and ud.write_shallow_tarballs and not os.path.exists(ud.fullshallow)
314
315 def tarball_need_update(self, ud):
316 return ud.write_tarballs and not os.path.exists(ud.fullmirror)
317
313 def try_premirror(self, ud, d): 318 def try_premirror(self, ud, d):
314 # If we don't do this, updating an existing checkout with only premirrors 319 # If we don't do this, updating an existing checkout with only premirrors
315 # is not possible 320 # is not possible