patch.bbclass: fix the logic error that resulted in tcp-wrappers patch application...
authorChris Larson <chris_larson@mentor.com>
Wed, 26 May 2010 19:27:56 +0000 (12:27 -0700)
committerChris Larson <chris_larson@mentor.com>
Wed, 26 May 2010 19:28:41 +0000 (12:28 -0700)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
classes/patch.bbclass

index 73395e3..7b0c444 100644 (file)
@@ -46,11 +46,12 @@ python patch_do_patch() {
                        local = os.path.join(workdir, base)
                        ext = os.path.splitext(base)[1]
 
-               apply = parm.get("apply")
-               if apply is not None and apply != "yes" and not "patch" in parm:
-                       if apply != "no":
-                               bb.msg.warn(None, "Unsupported value '%s' for 'apply' url param in '%s', please use 'yes' or 'no'" % (apply, url))
-                       continue
+               if "apply" in parm:
+                       apply = parm["apply"]
+                       if apply != "yes":
+                               if apply != "no":
+                                       bb.msg.warn(None, "Unsupported value '%s' for 'apply' url param in '%s', please use 'yes' or 'no'" % (apply, url))
+                               continue
                elif "patch" in parm:
                        bb.msg.warn(None, "Deprecated usage of 'patch' url param in '%s', please use 'apply={yes,no}'" % url)
                elif ext not in (".diff", ".patch"):