diff options
author | Ross Burton <ross@openedhand.com> | 2008-05-01 10:59:24 +0000 |
---|---|---|
committer | Ross Burton <ross@openedhand.com> | 2008-05-01 10:59:24 +0000 |
commit | 8bfb9258cf612488d568eb67bc89a9c271b70a70 (patch) | |
tree | 5947c7c9710b45de8290fe282a86dcab75ab4997 | |
parent | a74658d4ed04f39208ebb965fdb8d298b150ef82 (diff) | |
download | poky-8bfb9258cf612488d568eb67bc89a9c271b70a70.tar.gz |
Use bb.utils.md5_file isntead of calling md5sum
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4386 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index c697f4744f..c3bea447c1 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py | |||
@@ -479,14 +479,7 @@ class Fetch(object): | |||
479 | verify_md5sum = staticmethod(verify_md5sum) | 479 | verify_md5sum = staticmethod(verify_md5sum) |
480 | 480 | ||
481 | def write_md5sum(url, ud, d): | 481 | def write_md5sum(url, ud, d): |
482 | if bb.which(data.getVar('PATH', d), 'md5sum'): | 482 | md5data = bb.utils.md5_file(ud.localpath) |
483 | try: | ||
484 | md5pipe = os.popen('md5sum ' + ud.localpath) | ||
485 | md5data = (md5pipe.readline().split() or [ "" ])[0] | ||
486 | md5pipe.close() | ||
487 | except OSError: | ||
488 | md5data = "" | ||
489 | |||
490 | # verify the md5sum | 483 | # verify the md5sum |
491 | if not Fetch.verify_md5sum(ud, md5data): | 484 | if not Fetch.verify_md5sum(ud, md5data): |
492 | raise MD5SumError(url) | 485 | raise MD5SumError(url) |