summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2024-01-31 19:31:00 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-19 15:08:30 +0000
commit272d5ae098e3519b4d484f36a0497cb944667f74 (patch)
treed9f91e7c37d29e7d647a60ebce393347e56bce00 /bitbake/lib/bb/fetch2/git.py
parent09ecbcd307ee86f76238968aa8ed0005a5373b5d (diff)
downloadpoky-272d5ae098e3519b4d484f36a0497cb944667f74.tar.gz
bitbake: fetch2/git.py: add comment in try_premirrors
The purpose of ensuring 'incremental fetch' is not easy to see from the codes. So add comments to explain this. (Bitbake rev: 8b890b87e30cd05ec92ed71ee3691a47b4d77253) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r--bitbake/lib/bb/fetch2/git.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 1faa2145cf..db1e286371 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -361,6 +361,11 @@ class Git(FetchMethod):
361 # we need to try premirrors first as using upstream is destined to fail. 361 # we need to try premirrors first as using upstream is destined to fail.
362 if not trusted_network(d, ud.url): 362 if not trusted_network(d, ud.url):
363 return True 363 return True
364 # the following check is to ensure incremental fetch in downloads, this is
365 # because the premirror might be old and does not contain the new rev required,
366 # and this will cause a total removal and new clone. So if we can reach to
367 # network, we prefer upstream over premirror, though the premirror might contain
368 # the new rev.
364 if os.path.exists(ud.clonedir): 369 if os.path.exists(ud.clonedir):
365 return False 370 return False
366 return True 371 return True