diff options
Diffstat (limited to 'bitbake/lib/bb/fetch/__init__.py')
-rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 22 |
1 files changed, 22 insertions, 0 deletions
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): | |||
185 | return False | 185 | return False |
186 | try_mirror = staticmethod(try_mirror) | 186 | try_mirror = staticmethod(try_mirror) |
187 | 187 | ||
188 | def check_for_tarball(d, tarfn, dldir, date): | ||
189 | """ | ||
190 | Check for a local copy then check the tarball stash. | ||
191 | Both checks are skipped if date == 'now'. | ||
192 | |||
193 | d Is a bb.data instance | ||
194 | tarfn is the name of the tarball | ||
195 | date is the SRCDATE | ||
196 | """ | ||
197 | if "now" != date: | ||
198 | dl = os.path.join(dldir, tarfn) | ||
199 | if os.access(dl, os.R_OK): | ||
200 | bb.debug(1, "%s already exists, skipping checkout." % tarfn) | ||
201 | return True | ||
202 | |||
203 | # try to use the tarball stash | ||
204 | if Fetch.try_mirror(d, tarfn): | ||
205 | return True | ||
206 | return False | ||
207 | check_for_tarball = staticmethod(check_for_tarball) | ||
208 | |||
209 | |||
188 | import cvs | 210 | import cvs |
189 | import git | 211 | import git |
190 | import local | 212 | import local |