From: Chris Larson Date: Wed, 26 May 2010 19:27:56 +0000 (-0700) Subject: patch.bbclass: fix the logic error that resulted in tcp-wrappers patch application... X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a56048dedf697b749877bc258a5f751c96a71561;p=openembedded.git patch.bbclass: fix the logic error that resulted in tcp-wrappers patch application failures Signed-off-by: Chris Larson --- diff --git a/classes/patch.bbclass b/classes/patch.bbclass index 73395e3c45..7b0c44471a 100644 --- a/classes/patch.bbclass +++ b/classes/patch.bbclass @@ -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"):