diff options
| author | Stefan Schmidt <stefan@datenfreihafen.org> | 2009-05-25 09:54:29 +0200 |
|---|---|---|
| committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2009-05-25 09:54:29 +0200 |
| commit | 99dd85f176d8dbc1f81ed96b8bd2409ba3dbcd32 (patch) | |
| tree | 20e0735f73d2a422f75fcb6bf408efd2bd14d0c1 /classes/patch.bbclass | |
| parent | 8ef37e61f2e2db01d32dd6ec9a89202e973dddc8 (diff) | |
| parent | 8ce0d1274b868674c997ef52b1c8753c033a8a08 (diff) | |
Merge branch 'org.openembedded.dev' of git@git.openembedded.org:openembedded into org.openembedded.dev
Diffstat (limited to 'classes/patch.bbclass')
| -rw-r--r-- | classes/patch.bbclass | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/classes/patch.bbclass b/classes/patch.bbclass index 075e826523..2f99e4cf30 100644 --- a/classes/patch.bbclass +++ b/classes/patch.bbclass @@ -13,14 +13,22 @@ def patch_init(d): return "Error: %s not found." % self.path def md5sum(fname): - import md5, sys + import sys + + # when we move to Python 2.5 as minimal supported + # we can kill that try/except as hashlib is 2.5+ + try: + import hashlib + m = hashlib.md5() + except ImportError: + import md5 + m = md5.new() try: f = file(fname, 'rb') except IOError: raise NotFoundError(fname) - m = md5.new() while True: d = f.read(8096) if not d: @@ -519,7 +527,7 @@ python patch_do_patch() { bb.note("Patch '%s' applies to earlier revisions" % pname) continue - bb.note("Applying patch '%s' (%s)" % (pname, unpacked)) + bb.note("Applying patch '%s' (%s)" % (pname, base_path_out(unpacked, d))) try: patchset.Import({"file":unpacked, "remote":url, "strippath": pnum}, True) except: |
