diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
| -rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 11 |
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): |
