From bc8ad1b1cda0dd21b5b0b816b386b0bf96d5891a Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 10 Jun 2006 08:56:40 +0000 Subject: bitbake: Update against upstream stable branch (includes srcdate='now' support) git-svn-id: https://svn.o-hand.com/repos/poky/trunk@458 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- bitbake/lib/bb/fetch/__init__.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'bitbake/lib/bb/fetch/__init__.py') diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index ac698a0d1c..a2defd25a5 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py @@ -185,6 +185,28 @@ class Fetch(object): return False try_mirror = staticmethod(try_mirror) + def check_for_tarball(d, tarfn, dldir, date): + """ + Check for a local copy then check the tarball stash. + Both checks are skipped if date == 'now'. + + d Is a bb.data instance + tarfn is the name of the tarball + date is the SRCDATE + """ + if "now" != date: + dl = os.path.join(dldir, tarfn) + if os.access(dl, os.R_OK): + bb.debug(1, "%s already exists, skipping checkout." % tarfn) + return True + + # try to use the tarball stash + if Fetch.try_mirror(d, tarfn): + return True + return False + check_for_tarball = staticmethod(check_for_tarball) + + import cvs import git import local -- cgit v1.2.3-54-g00ecf