[oe] [PATCH 2/3] base.bbclass: fixed 'apply=no' behavior

Enrico Scholz enrico.scholz at sigma-chemnitz.de
Thu May 27 12:41:10 UTC 2010


After the recent change to autodetect patchfiles in SRC_URI's, files
with 'apply=no' were not copied to workdir anymore.  This broke e.g.
dropbear which marks a patch as 'apply=no' and applies it manually.

This patch evaluates content of 'apply' parameter and copies files to
workdir when it is not a patch or the parameter is false.

Signed-off-by: Enrico Scholz <enrico.scholz at sigma-chemnitz.de>
---
 classes/base.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/classes/base.bbclass b/classes/base.bbclass
index 21b5646..f21d8ad 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -217,7 +217,8 @@ def oe_unpack_file(file, data, url = None):
 		cmd = 'cp -pPR %s %s/%s/' % (file, os.getcwd(), destdir)
 	else:
 		(type, host, path, user, pswd, parm) = bb.decodeurl(url)
-		if not 'apply' in parm and not 'patch' in parm:
+		is_patch = path.endswith('.diff') or path.endswith('.patch')
+		if not oe_param_bool(parm, 'apply', is_patch) and not oe_param_bool(parm, 'patch', False):
 			# The "destdir" handling was specifically done for FILESPATH
 			# items.  So, only do so for file:// entries.
 			if type == "file":
-- 
1.7.0.1





More information about the Openembedded-devel mailing list