From 2689d8cf22d3809923aad5bd87e5e3e1821ffc82 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 28 Feb 2024 11:27:12 +0000 Subject: bitbake: fetch/git: Avoid clean upon failure Currently when git fetches fail, it destroys all the existing local clone data. For large repositories this can introduce long build delays when for example, you just typo'd the git revision hash. The git fetcher should be able to recover most directories so when the fetch is for a git repo, avoid removing things unless clean is explicitly called (e.g. a -c cleanall task). (Bitbake rev: 1b3cd039fe19b24bd4be9a0202a98cdcbb0e9443) Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/git.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bitbake/lib/bb/fetch2/git.py') diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index b43ee0da39..b9dc576d47 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -150,6 +150,9 @@ class Git(FetchMethod): def supports_checksum(self, urldata): return False + def cleanup_upon_failure(self): + return False + def urldata_init(self, ud, d): """ init git specific variable within url data -- cgit v1.2.3-54-g00ecf