diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2006-11-12 14:31:10 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2006-11-12 14:31:10 +0000 |
commit | d5613e9243a9dcea76deb9eb38b82d4ca0faf0d5 (patch) | |
tree | 937470e2b13c909de684478250732fb19886fc81 /lib/bb/fetch | |
parent | 9e86f17c8fdbd17ce4b3d0716a6b36fe58dc87d6 (diff) | |
download | bitbake-d5613e9243a9dcea76deb9eb38b82d4ca0faf0d5.tar.gz |
fetchers: Remove check_for_tarball() in favour of try_mirror directly
Diffstat (limited to 'lib/bb/fetch')
-rw-r--r-- | lib/bb/fetch/__init__.py | 20 | ||||
-rw-r--r-- | lib/bb/fetch/cvs.py | 2 | ||||
-rw-r--r-- | lib/bb/fetch/svk.py | 2 | ||||
-rw-r--r-- | lib/bb/fetch/svn.py | 2 |
4 files changed, 3 insertions, 23 deletions
diff --git a/lib/bb/fetch/__init__.py b/lib/bb/fetch/__init__.py index 438bfc1ba..d75afaad6 100644 --- a/lib/bb/fetch/__init__.py +++ b/lib/bb/fetch/__init__.py @@ -205,26 +205,6 @@ 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 date and date == "now": - return False - - # 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 diff --git a/lib/bb/fetch/cvs.py b/lib/bb/fetch/cvs.py index fa2da17d3..4c72bdaa8 100644 --- a/lib/bb/fetch/cvs.py +++ b/lib/bb/fetch/cvs.py @@ -96,7 +96,7 @@ class Cvs(Fetch): tarfn = ud.localfile # try to use the tarball stash - if Fetch.check_for_tarball(d, tarfn, dldir, date): + if (date != "now") and Fetch.try_mirror(d, ud.localfile): bb.msg.debug(1, bb.msg.domain.Fetcher, "%s already exists or was mirrored, skipping cvs checkout." % tarfn) return diff --git a/lib/bb/fetch/svk.py b/lib/bb/fetch/svk.py index 05e5413e3..8f106e73c 100644 --- a/lib/bb/fetch/svk.py +++ b/lib/bb/fetch/svk.py @@ -88,7 +88,7 @@ class Svk(Fetch): data.setVar('TARFILES', dlfile, localdata) data.setVar('TARFN', tarfn, localdata) - if Fetch.check_for_tarball(d, tarfn, dldir, date): + if (date != "now") and Fetch.try_mirror(d, ud.localfile): return olddir = os.path.abspath(os.getcwd()) diff --git a/lib/bb/fetch/svn.py b/lib/bb/fetch/svn.py index 3c55f938e..a068fa144 100644 --- a/lib/bb/fetch/svn.py +++ b/lib/bb/fetch/svn.py @@ -85,7 +85,7 @@ class Svn(Fetch): tarfn = ud.localfile # try to use the tarball stash - if Fetch.check_for_tarball(d, tarfn, dldir, ud.date): + if (date != "now") and Fetch.try_mirror(d, ud.localfile): bb.msg.debug(1, bb.msg.domain.Fetcher, "%s already exists or was mirrored, skipping svn checkout." % tarfn) return |