diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2024-01-31 19:31:00 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-02-19 12:01:00 +0000 |
commit | 8b890b87e30cd05ec92ed71ee3691a47b4d77253 (patch) | |
tree | ce48b053e3051aab706095ce5e2c66d69fe30240 /lib | |
parent | 80c91ceb81b1cae203067af58d3f1fe9c619ae83 (diff) | |
download | bitbake-8b890b87e30cd05ec92ed71ee3691a47b4d77253.tar.gz |
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.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bb/fetch2/git.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py index 1faa2145c..db1e28637 100644 --- a/lib/bb/fetch2/git.py +++ b/lib/bb/fetch2/git.py @@ -361,6 +361,11 @@ class Git(FetchMethod): # we need to try premirrors first as using upstream is destined to fail. if not trusted_network(d, ud.url): return True + # the following check is to ensure incremental fetch in downloads, this is + # because the premirror might be old and does not contain the new rev required, + # and this will cause a total removal and new clone. So if we can reach to + # network, we prefer upstream over premirror, though the premirror might contain + # the new rev. if os.path.exists(ud.clonedir): return False return True |