Message ID | 20220506141733.3298-3-pavel@zhukoff.net |
---|---|
State | New |
Headers | show |
Series | [v3,1/3] Honour BB_FETCH_PREMIRRORONLY option | expand |
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py index e556f297..b17703d8 100644 --- a/lib/bb/fetch2/git.py +++ b/lib/bb/fetch2/git.py @@ -338,11 +338,7 @@ class Git(FetchMethod): def try_premirror(self, ud, d): # If we don't do this, updating an existing checkout with only premirrors # is not possible - if bb.utils.to_boolean(d.getVar("BB_FETCH_PREMIRRORONLY")): - return True - if os.path.exists(ud.clonedir): - return False - return True + return bb.utils.to_boolean(d.getVar("BB_FETCH_PREMIRRORONLY")) or not os.path.exists(ud.clonedir) def download(self, ud, d): """Fetch url"""
This is non-functional change and aim to improve readability of the function. Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com> --- lib/bb/fetch2/git.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)