Patchwork [2/4] base.bbclass: Since we require python 2.6 which always contains hashlib we can drop this fallback code

login
register
mail settings
Submitter Richard Purdie
Date June 23, 2011, 12:27 p.m.
Message ID <4a9f1c5f4aa04565439bcdfa522a287340f0ec24.1308831847.git.richard.purdie@linuxfoundation.org>
Download mbox | patch
Permalink /patch/6411/
State New, archived
Headers show

Comments

Richard Purdie - June 23, 2011, 12:27 p.m.
Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/base.bbclass |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

Patch

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 4681489..f390f08 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -326,16 +326,6 @@  python () {
         depends = depends + " osc-native:do_populate_sysroot"
         bb.data.setVarFlag('do_fetch', 'depends', depends, d)
 
-    # bb.utils.sha256_file() will fail if hashlib isn't present, so we fallback
-    # on shasum-native.  We need to ensure that it is staged before we fetch.
-    if bb.data.getVar('PN', d, True) != "shasum-native":
-        try:
-            import hashlib
-        except ImportError:
-            depends = bb.data.getVarFlag('do_fetch', 'depends', d) or ""
-            depends = depends + " shasum-native:do_populate_sysroot"
-            bb.data.setVarFlag('do_fetch', 'depends', depends, d)
-
     # *.xz should depends on xz-native for unpacking
     # Not endswith because of "*.patch.xz;patch=1". Need bb.decodeurl in future
     if '.xz' in srcuri: