diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2005-07-21 22:40:39 +0000 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2005-07-21 22:40:39 +0000 |
commit | fb071a9b8e971f3050d1d129df24ecc35d7c5cd5 (patch) | |
tree | b6f7d5217df21fa68204ee752432e769dbcd8257 | |
parent | c9eeec9c91e4f0bb3410d3544e89a0fa741d273e (diff) | |
download | bitbake-fb071a9b8e971f3050d1d129df24ecc35d7c5cd5.tar.gz |
bitbake/lib/bb/fetch.py:
-Prepare the Wget fetcher to soon check the MD5SUMs in many
different ways.
-rw-r--r-- | lib/bb/fetch.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/bb/fetch.py b/lib/bb/fetch.py index 67e65f18e..982ab51b7 100644 --- a/lib/bb/fetch.py +++ b/lib/bb/fetch.py @@ -172,7 +172,17 @@ class Wget(Fetch): def go(self, d, urls = []): """Fetch urls""" - def fetch_uri(uri, basename, dl, md5, d): + + def md5_sum(basename, data): + """ + Fast and incomplete OVERRIDE implementation for MD5SUM handling + MD5SUM_basename = "SUM" and fallback to MD5SUM_basename + """ + var = "MD5SUM_%s" % basename + return getVar(var, data) or get("MD5SUM",data) + + + def fetch_uri(uri, basename, dl, md5, parm, d): if os.path.exists(dl): # file exists, but we didnt complete it.. trying again.. fetchcmd = data.getVar("RESUMECOMMAND", d, 1) @@ -234,14 +244,14 @@ class Wget(Fetch): for (find, replace) in premirrors: newuri = uri_replace(uri, find, replace, d) if newuri != uri: - if fetch_uri(newuri, basename, dl, md5, localdata): + if fetch_uri(newuri, basename, dl, md5, parm, localdata): completed = 1 break if completed: continue - if fetch_uri(uri, basename, dl, md5, localdata): + if fetch_uri(uri, basename, dl, md5, parm, localdata): continue # try mirrors @@ -249,7 +259,7 @@ class Wget(Fetch): for (find, replace) in mirrors: newuri = uri_replace(uri, find, replace, d) if newuri != uri: - if fetch_uri(newuri, basename, dl, md5, localdata): + if fetch_uri(newuri, basename, dl, md5, parm, localdata): completed = 1 break |