From 7117a4458b0bf25dbe380f01e98e236ec3856e26 Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Wed, 8 Sep 2010 14:03:41 +0100 Subject: bitbake/fetch: add try_premirror method and special case git fetcher Add a new method, try_premirror, to the Fetch object which checks to see whether the file needs to be fetched from a premirror. Override this in the Git fetcher to only require a pre-mirror fetch when the clone directory does not exist. Fixes [BUGID 290] Signed-off-by: Joshua Lock --- bitbake/lib/bb/fetch/git.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bitbake/lib/bb/fetch/git.py') diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py index b6126cbe9..938e0c08b 100644 --- a/bitbake/lib/bb/fetch/git.py +++ b/bitbake/lib/bb/fetch/git.py @@ -90,6 +90,12 @@ class Git(Fetch): return True return False + def try_premirror(self, d, ud): + if os.path.exists(ud.clonedir): + return False + + return True + def go(self, loc, ud, d): """Fetch url""" -- cgit v1.2.3