From 8bfb9258cf612488d568eb67bc89a9c271b70a70 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross@openedhand.com>
Date: Thu, 1 May 2008 10:59:24 +0000
Subject: 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
---
 bitbake/lib/bb/fetch/__init__.py | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index c697f4744..c3bea447c 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -479,14 +479,7 @@ class Fetch(object):
     verify_md5sum = staticmethod(verify_md5sum)
 
     def write_md5sum(url, ud, d):
-        if bb.which(data.getVar('PATH', d), 'md5sum'):
-            try:
-                md5pipe = os.popen('md5sum ' + ud.localpath)
-                md5data = (md5pipe.readline().split() or [ "" ])[0]
-                md5pipe.close()
-            except OSError:
-                md5data = ""
-
+        md5data = bb.utils.md5_file(ud.localpath)
         # verify the md5sum
         if not Fetch.verify_md5sum(ud, md5data):
             raise MD5SumError(url)
-- 
cgit v1.2.3